feat(properties): simplify properties configuration#2
Merged
Conversation
…egration test config
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR introduces Role Profile & Peer Configuration to dramatically simplify role-based properties configuration, along with GitHub CI/CD workflows for automated testing.
Motivation
Previously, each sample service required extensive manual YAML configuration for key management, JWKS consumers, and service discovery — often 50+ lines of boilerplate per service. This PR introduces a convention-over-configuration approach where enabling a role (e.g.,
authorization-server) automatically infers all required infrastructure settings through Role Profiles and Peer Configurations.Key Concepts
agent-idp,agent-user-idp,authorization-server) with their issuer URLs@Conditionalannotations work correctlyType of Change
Changes Made
Core — Role Profile & Peer Configuration System
RoleProfile: Immutable value object defining a role's infrastructure requirements (signing keys, verification keys, decryption keys, JWKS provider flag, required capabilities)RoleProfileRegistry: Registry of all built-in role profiles (agent,agent-idp,agent-user-idp,as-user-idp,authorization-server,resource-server)PeerProperties: Configuration for declaring peer service relationships with issuer URLsRoleAwareEnvironmentPostProcessor: SpringEnvironmentPostProcessorthat infers key management, JWKS consumers, and service discovery properties from enabled roles and their peersPeerConfigurationDiscoveryClient: Service discovery client that resolves peer base URLsAutoConfiguration Enhancements
JweEncryptionAutoConfiguration: EnhancedDecryptionKeyAvailableConditionwith Strategy 3 (role profile inference) and fixedresolveEncryptionKeyto use local key generationCoreAutoConfiguration: AddedOaaConfigurationControllerbean registration for runtime configuration metadata endpointAgentAutoConfiguration: Refactored to useConfigConstantsand improved conditional bean creationConfiguration Simplification (Sample Services)
API & Observability
OaaConfigurationController: New REST endpoint exposing runtime configuration metadata (enabled roles, capabilities, peers, key management)OaaConfigurationMetadata: Response model for configuration introspectionCI/CD
.github/workflows/ci.yml: Unit test CI workflow (JDK 17, Maven cache).github/workflows/e2e.yml: E2E integration test workflow usingrun-e2e-tests.shwith Chromium, 10-minute timeout.github/workflows/codeql.yml: CodeQL static analysis (weekly).github/workflows/dependency-review.yml: Dependency security review on PRsDocumentation
docs/architecture/README.md: Architecture documentationTesting
New Test Classes:
RoleProfileTest— 206 lines, validates role profile immutability and builderRoleProfileRegistryTest— 195 lines, validates all built-in profilesPeerPropertiesTest— 76 lines, validates peer configuration bindingRoleAwareEnvironmentPostProcessorTest— 300 lines, validates environment inference logicOpenAgentAuthPropertiesTest— expanded with peer configuration testsJweEncryptionAutoConfigurationTest— expanded with DecryptionKeyAvailableCondition Strategy 3 testsAgentAutoConfigurationTest— 64 lines, new test classCoreAutoConfigurationTest— expanded with JwksController null-bean test fixOaaConfigurationMetadataTest— 198 lines, validates configuration metadata modelTest Instructions:
Checklist
Breaking Changes
RolesProperties: Addedpeersfield to role configuration. Existing configurations without peers continue to work — peers are optional and only used for inference.Migration Path:
peersconfiguration under each role to enable auto-inference:Additional Context
Architecture Diagram:
Stats: 42 files changed, 3611 insertions(+), 394 deletions(-)