aws / aws/aws-secretsmanager-caching-java
Providing access to secret's metadata
- Lingua principale
- Java
- Stelle
- 83
- Fork
- 39
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hi,
I'm working on my fork to slightly modify the source code in order to provide visibility on the secret's metadata.
This information is coming through `DescribeSecret` and it's already cached in the `SecretCacheObject`.
I would like to submit a pull request to your repository and my proposal would be to change the `SecretCacheObject.getResult` method to public and implement a `SecretCache.describeSecret` method like the following:
```
/**
* Method to retrieve the description of a secret from AWS Secrets Manager.
*
* @param secretId
* The identifier for the secret being requested.
* @return The string secret
*/
public DescribeSecretResult describeSecret(final String secretId) {
SecretCacheItem secret = this.getCachedSecret(secretId);
return secret.getResult().clone();
}
```
This way, accessing the secret's metadata does not request a second trip to the AWS SecretsManager or the implementation of a secondary cache.
This is my first pull request here, please be nice ;-)
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con SecretCacheObject.getResult e SecretCache.getCachedSecret, quindi esamina come i metadati di DescribeSecret vengono memorizzati nella cache in SecretCacheItem. La modifica è completa quando i chiamanti possono recuperare i metadati del secret memorizzati nella cache tramite SecretCache.describeSecret senza effettuare un'ulteriore richiesta ad AWS Secrets Manager; aggiungi o aggiorna i test Java pertinenti per verificare questo comportamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- aws, java
- Ambito
- security
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 45/100