-
Notifications
You must be signed in to change notification settings - Fork 1.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
[Feature/Identity] Allow for Encryption/Decryption of Principals into PITs #4730
[Feature/Identity] Allow for Encryption/Decryption of Principals into PITs #4730
Conversation
Signed-off-by: Stephen Crawford <[email protected]>
Signed-off-by: Stephen Crawford <[email protected]>
Signed-off-by: Stephen Crawford <[email protected]>
Signed-off-by: Stephen Crawford <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
@scrawfor99 Can you prepend the title of this PR with |
server/src/main/java/org/opensearch/identity/ExtensionTokenProcessor.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Stephen Crawford <[email protected]>
Signed-off-by: Stephen Crawford <[email protected]>
Should be all set |
Signed-off-by: Stephen Crawford <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
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.
Thank you for the PR @scrawfor99! If you want to submit a PR to solicit initial feedback you can use Github's Draft PR
feature to distinguish the PR as a WIP (work in progress).
Can you add tests for the functionality added in this PR?
server/src/main/java/org/opensearch/identity/ExtensionTokenProcessor.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/identity/ExtensionTokenProcessor.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/identity/ExtensionTokenProcessor.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/identity/ExtensionTokenProcessor.java
Outdated
Show resolved
Hide resolved
Oops I did not realize but will mark things as such in the future--still new to using GitHub with more than 1/2 other people haha. |
Signed-off-by: Stephen Crawford <[email protected]>
Signed-off-by: Stephen Crawford <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Stephen Crawford <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Stephen Crawford <[email protected]>
Signed-off-by: Stephen Crawford <[email protected]>
Signed-off-by: Stephen Crawford <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Stephen Crawford <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Stephen Crawford <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Stephen Crawford <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
@peternied What is the protocol for handling this? Everything seems fine on my end but now the check is failing because of memory errors from other code. Unless I am misunderstanding the console output. |
Sounds like there is as bug in OpenSearch, can you capture the error output and create a bug like the following? |
Done so awaiting response #4907 |
Signed-off-by: Stephen Crawford <[email protected]>
Signed-off-by: Stephen Crawford <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Stephen Crawford <[email protected]>
Signed-off-by: Stephen Crawford <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
@scrawfor99 I merged this because the failed tests are unrelated to your changes. Next merge from main should resolve them (also what a pain!) Thanks for your contribution and stick-with-it-ness on this one! |
… PITs (#4730) Allow for Encryption/Decryption of Principals into PITs Signed-off-by: Stephen Crawford <[email protected]> Signed-off-by: Stephen Crawford <[email protected]>
Changes in the ExtensionTokenProcessor class to allow for encryption & decryption of principal & extension identifiers.
Tests not yet added but will add unit tests. Right now there are some lingering issues with the code that I would appreciate feedback or thoughts on:
As you can see at Line 146, the ExtractPrincipal method attempts to return the Principal object that is extracted from the encrypted message. Right now, I am not sure that we are actually storing the Principals themselves in any way so to be able to return an entire Principal instance we would need to be able to store and then retrieve the instance via NAME lookup.
I am also not entirely convinced by my implementation of the encoding combining at Line 106. I know you can combine byte[]s in this manner but I have not had a chance to confirm this preserves the encoding integrity as expected.
Resolves
Check List
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.