Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -33,15 +33,6 @@ enable_rest_service=true
# Whether to display rest service interface information through swagger. eg: http://ip:port/swagger.json
# enable_swagger=false

# the expiration time of the user login information cache (in seconds)
# cache_expire_in_seconds=28800

# maximum number of users can be stored in the user login cache.
# cache_max_num=100

# init capacity of users can be stored in the user login cache.
# cache_init_num=10

# is SSL enabled
# enable_https=false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,6 @@ private void loadProps(TrimProperties properties) {
Integer.parseInt(
properties.getProperty(
"idle_timeout_in_seconds", Integer.toString(conf.getIdleTimeoutInSeconds()))));
conf.setCacheExpireInSeconds(
Integer.parseInt(
properties.getProperty(
"cache_expire_in_seconds", Integer.toString(conf.getCacheExpireInSeconds()))));
conf.setCacheInitNum(
Integer.parseInt(
properties.getProperty("cache_init_num", Integer.toString(conf.getCacheInitNum()))));
conf.setCacheMaxNum(
Integer.parseInt(
properties.getProperty("cache_max_num", Integer.toString(conf.getCacheMaxNum()))));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
@Provider
public class AuthorizationFilter implements ContainerRequestFilter, ContainerResponseFilter {

private final UserCache userCache = UserCache.getInstance();
IoTDBRestServiceConfig config = IoTDBRestServiceDescriptor.getInstance().getConfig();

private static final SessionManager SESSION_MANAGER = SessionManager.getInstance();
Expand Down Expand Up @@ -85,15 +84,11 @@ public void filter(ContainerRequestContext containerRequestContext) throws IOExc
containerRequestContext.abortWith(resp);
return;
}
User user = userCache.getUser(authorizationHeader);
User user = checkLogin(containerRequestContext, authorizationHeader);
if (user == null) {
user = checkLogin(containerRequestContext, authorizationHeader);
if (user == null) {
return;
} else {
userCache.setUser(authorizationHeader, user);
}
return;
}

String sessionid = UUID.randomUUID().toString();
if (SESSION_MANAGER.getCurrSession() == null) {
RestClientSession restClientSession = new RestClientSession(sessionid);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ enable_rest_service=true
# the default row limit to a REST query response when the rowSize parameter is not given in request
# rest_query_default_row_size_limit=10000

# the expiration time of the user login information cache (in seconds)
# cache_expire_in_seconds=28800

# maximum number of users can be stored in the user login cache.
# cache_max_num=100

# init capacity of users can be stored in the user login cache.
# cache_init_num=10

# is SSL enabled
# enable_https=false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@ enable_rest_service=true
# the default row limit to a REST query response when the rowSize parameter is not given in request
# rest_query_default_row_size_limit=10000

# the expiration time of the user login information cache (in seconds)
# cache_expire_in_seconds=28800

# maximum number of users can be stored in the user login cache.
# cache_max_num=100

# init capacity of users can be stored in the user login cache.
# cache_init_num=10

# is SSL enabled
# enable_https=false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,21 +560,6 @@ enable_swagger=false
# Datatype: int
rest_query_default_row_size_limit=10000

# the expiration time of the user login information cache (in seconds)
# effectiveMode: restart
# Datatype: int
cache_expire_in_seconds=28800

# maximum number of users can be stored in the user login cache.
# effectiveMode: restart
# Datatype: int
cache_max_num=100

# init capacity of users can be stored in the user login cache.
# effectiveMode: restart
# Datatype: int
cache_init_num=10

# Is client authentication required
# effectiveMode: restart
# Datatype: boolean
Expand Down
Loading