ca: remove Provider.State method
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 39
Description
Related to #11347
[Provider.State](https://pkg.go.dev/github.com/hashicorp/consul/agent/connect/ca#Provider) returns the current provider state.
The provider state is only updated as part of the call to `GenerateRoot` in the primary, and `GenerateIntermediateCSR` in the secondary. Instead of a separate method for this state we have two options for removing it:
1. return the state from `GenerateRoot`, and `GenerateIntermediateCSR`, and persist it as we do today, as part of the config
2. change the AWS PCA provider (the only one that uses this state) to use the same `ProviderState` table as the Consul provider, and remove the need to send state back to the caller.
Either of these options would remove the need for this extra method.
Contributor guide
Research direction
Start with the Provider.State method and the GenerateRoot and GenerateIntermediateCSR entry points described in the issue, then review related issue #11347. Compare returning state from those methods with changing the AWS PCA provider to use the ProviderState table. Done means agreeing on one approach and removing the extra method without losing provider state persistence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- security
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100