Skip to content

Conversation

@ywangd
Copy link
Member

@ywangd ywangd commented Jul 30, 2020

The JDK system property makes sure date digits are always represented as ASCII chars.
This in turn helps the Kerberos response to be correctly encoded and recognised by the client.

Resolves: #57749

Ensure date digits are always represented as ASCII chars.
@ywangd ywangd added >test Issues or PRs that are addressing/adding tests :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) v6.8.12 labels Jul 30, 2020
@ywangd ywangd requested a review from pgomulka July 30, 2020 11:38
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security (:Security/Authentication)

@elasticmachine elasticmachine added the Team:Security Meta label for security team label Jul 30, 2020
Copy link
Contributor

@pgomulka pgomulka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good, but I wanted to make sure we don't break anything for jdk8.
left a comment to clarify

}

unitTest {
systemProperty 'java.locale.providers','SPI,COMPAT'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what would happen with jdk8 ? COMPAT is not known there. as per http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java#l135 it should throw some exceptions (although when I tried to reproduce it it did not fail)
can we make this conditional?
Also, do we need SPI there? SPI options is not used in 6.8 by ES as we do not provide IsoCalendarProvider (because SPIs have to be shipped with jre)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I forgot that we talked about this. I'll make it conditional for java 9 and later.

As for SPI, you are right that it is not needed here, I am adding it here with the attempt to be consistent with:

defaults(JUnit) {
vmParameters = '-ea -Djava.locale.providers=SPI,COMPAT'
}

@ywangd ywangd requested a review from pgomulka July 30, 2020 12:37
@ywangd
Copy link
Member Author

ywangd commented Jul 30, 2020

Thanks @pgomulka I have updated the PR as suggested.

Copy link
Contributor

@pgomulka pgomulka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
thank you for looking into this @ywangd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) Team:Security Meta label for security team >test Issues or PRs that are addressing/adding tests v6.8.12

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants