summaryrefslogtreecommitdiffstats
path: root/web/server/web_client.h
diff options
context:
space:
mode:
Diffstat (limited to 'web/server/web_client.h')
-rw-r--r--web/server/web_client.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/web/server/web_client.h b/web/server/web_client.h
index b9e528fc..4263e252 100644
--- a/web/server/web_client.h
+++ b/web/server/web_client.h
@@ -108,31 +108,14 @@ struct response {
};
-typedef enum web_client_acl {
- WEB_CLIENT_ACL_NONE = 0,
- WEB_CLIENT_ACL_NOCHECK = 0,
- WEB_CLIENT_ACL_DASHBOARD = 1 << 0,
- WEB_CLIENT_ACL_REGISTRY = 1 << 1,
- WEB_CLIENT_ACL_BADGE = 1 << 2
-} WEB_CLIENT_ACL;
-
-#define web_client_can_access_dashboard(w) ((w)->acl & WEB_CLIENT_ACL_DASHBOARD)
-#define web_client_can_access_registry(w) ((w)->acl & WEB_CLIENT_ACL_REGISTRY)
-#define web_client_can_access_badges(w) ((w)->acl & WEB_CLIENT_ACL_BADGE)
-
-#define web_client_can_access_stream(w) \
- (!web_allow_streaming_from || simple_pattern_matches(web_allow_streaming_from, (w)->client_ip))
-
-#define web_client_can_access_netdataconf(w) \
- (!web_allow_netdataconf_from || simple_pattern_matches(web_allow_netdataconf_from, (w)->client_ip))
-
struct web_client {
unsigned long long id;
WEB_CLIENT_FLAGS flags; // status flags for the client
WEB_CLIENT_MODE mode; // the operational mode of the client
WEB_CLIENT_ACL acl; // the access list of the client
-
+ int port_acl; // the operations permitted on the port the client connected to
+ char *auth_bearer_token; // the Bearer auth token (if sent)
size_t header_parse_tries;
size_t header_parse_last_size;