Skip to content

Conversation

opentdf-automation[bot]
Copy link
Contributor

Description

Backport of #2601 to release/protocol/go/v0.6.

@opentdf-automation
Copy link
Contributor Author

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-2601-to-release/protocol/go/v0.6
git worktree add --checkout .worktree/backport-2601-to-release/protocol/go/v0.6 backport-2601-to-release/protocol/go/v0.6
cd .worktree/backport-2601-to-release/protocol/go/v0.6
git reset --hard HEAD^
git cherry-pick -x a5fc994acc5491bf8cbf751b675302b459e1f3b0
git push --force-with-lease

@opentdf-automation opentdf-automation bot force-pushed the backport-2601-to-release/protocol/go/v0.6 branch from 15d2f7f to 3e8ccc0 Compare September 12, 2025 14:04
@github-actions github-actions bot added comp:db DB component comp:policy Policy Configuration ( attributes, subject mappings, resource mappings, kas registry) comp:kas Key Access Server docs Documentation size/l labels Sep 12, 2025
…-instance support (#2601)

This PR implements the provider configuration manager column enhancement
and includes a significant architecture improvement to eliminate code
duplication.

 Core Features

- ✅ Added manager column to provider_config table with composite unique
constraint (provider_name + manager)
- ✅ Database migration with backward compatibility (existingrecords
default to 'local' manager)
- ✅ Updated protobuf definitions to require manager field in API
requests
  - ✅ Enhanced SQL queries and audit logging to support manager field

  Key Benefits

1. Multiple Instance Support: Create multiple provider configs with same
name but different manager types
2. No Code Duplication: Trust system is single source of truth for
available managers
3. Automatic Discovery: Well-known configuration endpoint automatically
exposes registered trust key managers
4. Premium Integration: Custom managers integrate seamlessly via
existing WithTrustKeyManagerFactories pattern
5. Backward Compatibility: Existing providers automatically assigned
'local' manager type

  Technical Changes

  - Database: Added manager column with composite unique constraint
- API: Manager field now required in CreateProviderConfig, optional in
UpdateProviderConfig
- Service: Validates against RegistrationParams.KeyManagerFactories
instead of separate registry
- Well-known Config: Dynamically populated from trust key manager
factories
  - Tests: Updated to reflect new validation approach

  Usage for Custom Managers

  Premium builds can add custom managers using the existing
  pattern:
```go
  server.Start(
      server.WithTrustKeyManagerFactories(
          trust.NamedKeyManagerFactory{Name: "premium-hsm",
  Factory: hsmFactory},
          trust.NamedKeyManagerFactory{Name: "premium-vault",
  Factory: vaultFactory},
      ),
  )
```

- [ ] I have added or updated unit tests
- [ ] I have added or updated integration tests (if appropriate)
- [ ] I have added or updated documentation

(cherry picked from commit a5fc994)
@strantalis strantalis force-pushed the backport-2601-to-release/protocol/go/v0.6 branch from 3e8ccc0 to 1f3d45d Compare September 12, 2025 15:39
@strantalis strantalis closed this Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:db DB component comp:kas Key Access Server comp:policy Policy Configuration ( attributes, subject mappings, resource mappings, kas registry) docs Documentation size/l
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant