[Kerberos] Add bootstrap checks for kerberos realm#31548
Merged
bizybot merged 4 commits intoelastic:feature/kerberosfrom Jun 27, 2018
Merged
[Kerberos] Add bootstrap checks for kerberos realm#31548bizybot merged 4 commits intoelastic:feature/kerberosfrom
bizybot merged 4 commits intoelastic:feature/kerberosfrom
Conversation
As there are some system properties like `java.security.krb5.kdc` , `java.security.krb5.realm` which can specify values that are applicable to whole JVM. This is the reason for having only one instance of KerberosRealm. Each ES node will have a kerberos keytab with credentials. This keytab must exist for kerberos authentication to work. `KerberosRealmBootstrapCheck` performs these checks for given configuration.
Collaborator
|
Pinging @elastic/es-security |
set bootstrap failure when `type` not specified for realm
tvernum
reviewed
Jun 25, 2018
|
|
||
| @Override | ||
| public BootstrapCheckResult check(final BootstrapContext context) { | ||
| final Settings realmsSettings = RealmSettings.get(context.settings); |
Contributor
There was a problem hiding this comment.
I would recommend using RealmSettings.getRealmSettings instead.
It slightly reduces your reliance on the underlying realm config model.
Contributor
Author
There was a problem hiding this comment.
Thanks, Tim. Addressed this.
Contributor
Author
|
Hi, @tvernum I have addressed your review comment. Please take another look when you get some time. Thank you. |
jaymode
approved these changes
Jun 26, 2018
Member
jaymode
left a comment
There was a problem hiding this comment.
I left a request for improved javadocs on the class level. Otherwise LGTM
| import java.util.Map.Entry; | ||
|
|
||
| /** | ||
| * This class is used to perform bootstrap checks for kerberos realm. |
Member
There was a problem hiding this comment.
can you be more detailed here about the checks and why we have these checks?
Contributor
Author
There was a problem hiding this comment.
Thanks, addressed the javadocs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As there are some system properties like
java.security.krb5.kdc,
java.security.krb5.realm,java.security.krb5.confwhich canspecify values that are applicable to whole JVM. This is the reason
for having only one instance of Kerberos realm.
Each ES node will have a Kerberos keytab with credentials. This
keytab must exist for Kerberos authentication to work.
KerberosRealmBootstrapCheckperforms these checks for givenconfiguration.