Skip to content
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

Fix AccessControlException while creating client configuration for Personalize client #173

Conversation

kulket
Copy link
Contributor

@kulket kulket commented Jul 17, 2023

Description:

This change included fix for AccessControlException error while initializing client configuration for AWS Personalize client. We see below exception while intializing client configuration for Personalize client only when using credentials from opensearch keystore.
Exception message:

[2023-07-17T13:26:24,096][ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [88665a0bfb08.ant.amazon.com] fatal error in thread [opensearch[88665a0bfb08.ant.amazon.com][management][T#2]], exiting
java.lang.ExceptionInInitializerError: null
	at com.amazonaws.util.VersionInfoUtils.userAgent(VersionInfoUtils.java:142) ~[?:?]
	at com.amazonaws.util.VersionInfoUtils.initializeUserAgent(VersionInfoUtils.java:137) ~[?:?]
	at com.amazonaws.util.VersionInfoUtils.getUserAgent(VersionInfoUtils.java:100) ~[?:?]
	at com.amazonaws.ClientConfiguration.<clinit>(ClientConfiguration.java:80) ~[?:?]

....
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getClassLoader")
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:?]
	at java.security.AccessController.checkPermission(AccessController.java:897) ~[?:?]
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:322) ~[?:?]
....

Check List

  • New functionality includes testing.
  • All tests pass
  • New functionality has been documented.
  • New functionality has javadoc added
  • Commits are signed as per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…rsonalize client

### Description:
This change included fix AccessControlException while initialzing client configuration for AWS Personalize client.
We see below exception only when using credentials from opensearch keystore.
Exception message:
[ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [88665a0bfb08.ant.amazon.com] fatal error in thread [opensearch[88665a0bfb08.ant.amazon.com][management][T#2]], exiting
java.lang.ExceptionInInitializerError: null

Signed-off-by: Ketan Kulkarni <kektnr@amazon.com>
@kulket kulket marked this pull request as ready for review July 17, 2023 23:33
@mingshl mingshl added backport 2.x Backport to 2.x branch backport 2.9 labels Jul 18, 2023
@mingshl mingshl merged commit e6fe9ed into opensearch-project:main Jul 18, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 18, 2023
…rsonalize client (#173)

### Description:
This change included fix AccessControlException while initialzing client configuration for AWS Personalize client.
We see below exception only when using credentials from opensearch keystore.
Exception message:
[ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [88665a0bfb08.ant.amazon.com] fatal error in thread [opensearch[88665a0bfb08.ant.amazon.com][management][T#2]], exiting
java.lang.ExceptionInInitializerError: null

Signed-off-by: Ketan Kulkarni <kektnr@amazon.com>
(cherry picked from commit e6fe9ed)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 18, 2023
…rsonalize client (#173)

### Description:
This change included fix AccessControlException while initialzing client configuration for AWS Personalize client.
We see below exception only when using credentials from opensearch keystore.
Exception message:
[ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [88665a0bfb08.ant.amazon.com] fatal error in thread [opensearch[88665a0bfb08.ant.amazon.com][management][T#2]], exiting
java.lang.ExceptionInInitializerError: null

Signed-off-by: Ketan Kulkarni <kektnr@amazon.com>
(cherry picked from commit e6fe9ed)
mingshl pushed a commit that referenced this pull request Jul 18, 2023
…rsonalize client (#173) (#175)

### Description:
This change included fix AccessControlException while initialzing client configuration for AWS Personalize client.
We see below exception only when using credentials from opensearch keystore.
Exception message:
[ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [88665a0bfb08.ant.amazon.com] fatal error in thread [opensearch[88665a0bfb08.ant.amazon.com][management][T#2]], exiting
java.lang.ExceptionInInitializerError: null

Signed-off-by: Ketan Kulkarni <kektnr@amazon.com>
(cherry picked from commit e6fe9ed)

Co-authored-by: kulket <130191298+kulket@users.noreply.github.com>
mingshl pushed a commit that referenced this pull request Jul 18, 2023
…rsonalize client (#173) (#176)

### Description:
This change included fix AccessControlException while initialzing client configuration for AWS Personalize client.
We see below exception only when using credentials from opensearch keystore.
Exception message:
[ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [88665a0bfb08.ant.amazon.com] fatal error in thread [opensearch[88665a0bfb08.ant.amazon.com][management][T#2]], exiting
java.lang.ExceptionInInitializerError: null

Signed-off-by: Ketan Kulkarni <kektnr@amazon.com>
(cherry picked from commit e6fe9ed)

Co-authored-by: kulket <130191298+kulket@users.noreply.github.com>
@mingshl mingshl added the bug Something isn't working label Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch backport 2.9 bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants