-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
[Kerberos] Refactoring and remove configs with defaults #32152
[Kerberos] Refactoring and remove configs with defaults #32152
Conversation
This commit does some refactoring to remove support package and move class KerberosTicketValidator to kerberos package. That was the only class in that package, so no need for it to be in separate package. Changes done to use default values for jaas configuration options for the ones which we can use defaults. Fix couple of random failures in tests. Modified `refreshKrb5Config` to use default value `false` in KerberosTicketValidator. If the krb5.conf file is modified then we will need to restart JVM as the config will not be refreshed. For testing, `refreshKrb5Config` is set to `true` as we keep changing the kdc port. This is set in SpnegoClient and only for tests.
Pinging @elastic/es-security |
@@ -41,7 +41,7 @@ | |||
* It may respond with token which needs to be communicated with the peer. | |||
*/ | |||
public class KerberosTicketValidator { | |||
static final Oid SPNEGO_OID = getSpnegoOid(); | |||
public static final Oid SPNEGO_OID = getSpnegoOid(); |
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.
why did this become public? Did you remove the support package in the test directory structure
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.
Yes, I did not move the test support package classes, now I have moved them I do not need to make it public. Thank you.
@@ -49,7 +50,7 @@ | |||
* Use {@link #close()} to release and dispose {@link LoginContext} and | |||
* {@link GSSContext} after usage. | |||
*/ | |||
class SpnegoClient implements AutoCloseable { | |||
public class SpnegoClient implements AutoCloseable { |
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 can revert these changes if you remove the support package here too
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.
Yes, I did not move the test support package classes, now I have moved them so I do not need to make it public. Thank you.
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.
LGTM
This commit does some refactoring to remove support package
and move class KerberosTicketValidator to kerberos package.
That was the only class in that package, so no need for it to be in
separate package.
Changes done to use default values for jaas configuration options
to avoid unnecessary configuration.
Fix couple of random failures in tests.
Modified
refreshKrb5Config
to use default valuefalse
inKerberosTicketValidator. If the krb5.conf file is modified then we
will need to restart JVM as the config will not be refreshed. This
will need to be documented.
For testing,
refreshKrb5Config
is set totrue
as we keepchanging the kdc port. This is set in SpnegoClient and only for tests.