-
Notifications
You must be signed in to change notification settings - Fork 7
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
Limit system user login #579
base: master
Are you sure you want to change the base?
Conversation
crate/operator/create.py
Outdated
@@ -420,6 +420,8 @@ def get_statefulset_crate_command( | |||
"-Cauth.host_based.config.0.user": "crate", | |||
"-Cauth.host_based.config.0.address": "_local_", | |||
"-Cauth.host_based.config.0.method": "trust", | |||
"-Cauth.host_based.config.1.user": "system", | |||
"-Cauth.host_based.config.1.address": "10.0.0.0/8", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably make this configurable, since no guarantee that all k8s is using class A subnets? Also people might want to restrict it further, if they use a different subnet mask in their k8s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably make this configurable, since no guarantee that all k8s is using class A subnets? Also people might want to restrict it further, if they use a different subnet mask in their k8s.
configurable as in CRD?
spec.cluster.allowedSystemUserCIDR
?
@@ -173,6 +173,9 @@ spec: | |||
items: | |||
type: string | |||
type: array | |||
allowedSystemUserCIDR: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need this, if the setting is coming from the environment (config.ALLOWED_SYSTEM_USER_CIDR
) - we don't need to be able to override it for individual CrateDBs?
Summary of changes
Limit system user login to 10.0.0.0/8.I assumed that the configuration snippet from below limits the system to login from 10.0.0.0/8 only. But it seems like the 99.method=password spoils my plan!
In can see the real IP of the connection (=external IP)
system
can still login, due to the setting in line 89 where password login from everywhere is allowed.Checklist
CHANGES.rst