h2oai / h2oai/wave

Terminate WS connection if unauthorized

Open
#379 0 comments 0 reactions 0 assignees View on GitHub
feature security
Dominant language
Python
Stars
4.3k
Forks
371
Avg merge
26d 1h
Merged PRs (30d)
1

Description

**Is your feature request related to a problem? Please describe.**

~~wildcard redirect urls are not supported by any oidc provider. So we do a work around and wave.h2o.ai/instance/instanceId that redirects to instanceId.wave.h2o.ai~~

The other issue that is there is the websocket connection is still active even though it should not be authorized anymore

**Describe the solution you'd like**

~~I'd life a configuration parameter so I can specify the post logout redirect url.~~
I'd also like the websocket connection to be terminated otherwise the user is still logged in but there will no longer be a valid session.

```
query.Set("post_logout_redirect_uri", r.Host) -> query.Set("post_logout_redirect_uri", conf.logout_redirect_url)
```

**Additional context**
~~There really isn't a logout button so most users will not encounter this. The webpage will just be redirected to keycloak and give an invalid redirect_url error.~~

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by locating the websocket authorization and session/logout handling, then trace what happens when the session is no longer valid. Done means an unauthorized websocket connection is terminated and the behavior is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Domain
authentication, backend, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.