-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Adds certificate identity field to cross-cluster API keys #134604
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
Merged
Merged
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
c919d6c
Add integration testing for CrossCluster API Key certificate_identity…
gmjehovich 7458dd3
[CI] Auto commit changes from spotless
f181837
Update docs/changelog/134604.yaml
gmjehovich 0a639c6
Add 'certificate_identity' field to API Key, modify create/update Cro…
gmjehovich 3a25dfa
fix merge conflicts
gmjehovich 2d32743
[CI] Auto commit changes from spotless
cf45055
Merge branch 'main' into rcs_improvements
gmjehovich 0f04676
Fix constructors, spotlessApply
gmjehovich ef5a9e5
Fix createCrossClusterApiKey unit test
gmjehovich 8883e07
[CI] Auto commit changes from spotless
539302b
Fix updateCrossClusterApiKeyRequestTest
gmjehovich 13a9a69
[CI] Auto commit changes from spotless
fa1dff4
Merge branch 'main' into rcs_improvements
gmjehovich 2018d3a
Fix CC API Key Update Message and Test Assertion
gmjehovich 092a670
spotlessApply
gmjehovich 4e5b362
[CI] Auto commit changes from spotless
d8b64d2
Fix ApiKeyBackwardsCompatibilityIT, fix update error message check
gmjehovich 43fbfb9
Fix ApiKeyBackwardsCompatibilityIT.testCertificateIdentityBackwardsCo…
gmjehovich baeb233
[CI] Update transport version definitions
755647c
Remove authenticateWithApiKey from ApiKeyBackwardsCompatibilityIT.tes…
gmjehovich 540a69c
Add minimum version check to ApiKeyBackwardsCompatibilityIT.testCerti…
gmjehovich 101aca6
[CI] Update transport version definitions
a427d52
Merge branch 'main' into rcs_improvements
gmjehovich 0d38963
Add validation for certificate_identity to update path
gmjehovich bb773b5
Merge branch 'main' into rcs_improvements
gmjehovich 414f279
Fix validation logic, add capability to delete certificate_identity f…
gmjehovich 18f37d5
Fix NPE
gmjehovich c413dc3
[CI] Update transport version definitions
b156e8f
Fix testing bugs that resulted from new CertificateIdentity record
gmjehovich e3bc11b
Merge branch 'main' into rcs_improvements
gmjehovich d9286fe
Fix ApiKeyIntegTest assertion bug
gmjehovich da9d23d
Merge branch 'main' into rcs_improvements
gmjehovich 7395b7f
Remove certificate_identity field from UpdateApiKeyRequestTranslator,…
gmjehovich 8dd9e75
Merge branch 'main' into rcs_improvements
gmjehovich 2808fe4
Clean up certificate_identity testing in ApiKeyServiceTests
gmjehovich 4ef30ed
Delete redundant integ tests
gmjehovich 6de1798
Consolidate redundant code in ApiKeyBackwardsCompatibilityIT
gmjehovich 05ffd83
Merge branch 'main' into rcs_improvements
gmjehovich 95233d1
Merge branch 'main' into rcs_improvements
gmjehovich 01f4c89
Merge branch 'main' into rcs_improvements
gmjehovich af01316
Change cert_identity validation failure message
gmjehovich 9706f85
Update cert_identity version to 9.3.0 in APIKey BWC Test
gmjehovich 7049572
[CI] Auto commit changes from spotless
e0562b9
CertID parser no longer differentiates between explicit vs implicit null
gmjehovich 2e440b5
[CI] Auto commit changes from spotless
98c4896
Move shared bwc test logic to AbstractUpgradeTestCase
gmjehovich e8af6c3
[CI] Auto commit changes from spotless
13e010a
Rename cleanUp method in TokenBackwwardsCompatbilityIT
gmjehovich 9c008eb
Merge branch 'main' into rcs_improvements
gmjehovich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| pr: 134604 | ||
| summary: Adds certificate identity field to cross-cluster API keys | ||
| area: Security | ||
| type: enhancement | ||
| issues: [] |
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
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
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
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
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
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
26 changes: 26 additions & 0 deletions
26
...rc/main/java/org/elasticsearch/xpack/core/security/action/apikey/CertificateIdentity.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| package org.elasticsearch.xpack.core.security.action.apikey; | ||
|
|
||
| import org.elasticsearch.core.Nullable; | ||
|
|
||
| import java.util.regex.Pattern; | ||
| import java.util.regex.PatternSyntaxException; | ||
|
|
||
| public record CertificateIdentity(@Nullable String value) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This turned out nice! 👍 |
||
|
|
||
| public CertificateIdentity { | ||
| if (value != null) { | ||
| try { | ||
| Pattern.compile(value); | ||
| } catch (PatternSyntaxException e) { | ||
| throw new IllegalArgumentException("Invalid certificate_identity format: [" + value + "]. Must be a valid regex.", e); | ||
| } | ||
| } | ||
| } | ||
| } | ||
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.