Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(server): clear context after req done #2470

Merged
merged 28 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ae90955
chore(server): update swagger info for default server profile
SunnyBoy-WYH Jan 19, 2024
bb67693
chore(server): update swagger info for default server profile
SunnyBoy-WYH Jan 19, 2024
13f916f
fix(server): arthas default bind ip should not be 0.0.0.0
SunnyBoy-WYH Jan 27, 2024
30f1821
Merge branch 'master' into arthas-bind-ip
SunnyBoy-WYH Jan 27, 2024
2519b39
fix(server): arthas default bind ip should not be 0.0.0.0
SunnyBoy-WYH Jan 27, 2024
c787baf
Merge branch 'master' into arthas-bind-ip
SunnyBoy-WYH Feb 21, 2024
7d75e0d
fix(server): fix the bug which promtheus cant collect hg metric
SunnyBoy-WYH Feb 21, 2024
552dcb8
fix(server): fix the arthas default bind ip to 127.0.0.1
SunnyBoy-WYH Feb 27, 2024
ba74aaa
fix(server): clear auth context (TLS) after req done
SunnyBoy-WYH Mar 3, 2024
4f7fc0f
fix(server): clear auth context (TLS) after req done
SunnyBoy-WYH Mar 3, 2024
43288d9
fix: security bug
zyxxoo Jan 19, 2024
6104ed6
improve
zyxxoo Jan 19, 2024
906c0de
fix(server): white list change to fixed and flexable
SunnyBoy-WYH Mar 6, 2024
177e513
Merge branch 'arthas-bind-ip' into fix-context
SunnyBoy-WYH Mar 6, 2024
165b5c8
fix(server): white list change to fixed and flexable
SunnyBoy-WYH Mar 6, 2024
7eeda25
fix(server): white list change to fixed and flexable
SunnyBoy-WYH Mar 6, 2024
5aa1a40
fix(server): white list change to fixed and flexable
SunnyBoy-WYH Mar 6, 2024
6030882
Merge branch 'master' into pr/2470
imbajin Mar 8, 2024
41459f5
remove login from whiteList
imbajin Mar 8, 2024
1435e44
Merge branch 'master' into fix-context
imbajin Mar 9, 2024
3643116
Update AccessLogFilter.java
imbajin Mar 9, 2024
7484ab3
Update AuthenticationFilter.java
imbajin Mar 9, 2024
6a50b99
fix(server): white list change to fixed and flexable
SunnyBoy-WYH Mar 10, 2024
ed2b24a
fix(server): better code
SunnyBoy-WYH Mar 13, 2024
80c1634
fix(server): better code
SunnyBoy-WYH Mar 13, 2024
ed250f2
fix(server): better code
SunnyBoy-WYH Mar 13, 2024
2e3325c
fix(server): better code
SunnyBoy-WYH Mar 18, 2024
5817ccd
tiny improve
imbajin Mar 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.io.IOException;
import java.net.URI;

import org.apache.hugegraph.auth.HugeGraphAuthProxy;
import org.apache.hugegraph.config.HugeConfig;
import org.apache.hugegraph.config.ServerOptions;
import org.apache.hugegraph.metrics.MetricsUtil;
Expand Down Expand Up @@ -114,6 +115,9 @@ public void filter(ContainerRequestContext requestContext,
executeTime, null, method, path, uri.getQuery());
}
}

// Release the context
SunnyBoy-WYH marked this conversation as resolved.
Show resolved Hide resolved
HugeGraphAuthProxy.resetContext();
SunnyBoy-WYH marked this conversation as resolved.
Show resolved Hide resolved
}

private boolean statusOk(int status) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ default User authenticate(final Map<String, String> credentials)
HugeGraphAuthProxy.logUser(user, credentials.get(KEY_PATH));
/*
* Set authentication context
* TODO: unset context after finishing a request
*/
SunnyBoy-WYH marked this conversation as resolved.
Show resolved Hide resolved
HugeGraphAuthProxy.setContext(new Context(user));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1818,7 +1818,7 @@ protected static Context setContext(Context context) {
return old;
}

protected static void resetContext() {
public static void resetContext() {
SunnyBoy-WYH marked this conversation as resolved.
Show resolved Hide resolved
CONTEXTS.remove();
}

Expand Down
Loading