aws / aws/aws-secretsmanager-caching-java
Providing access to secret's metadata
- Langage dominant
- Java
- Étoiles
- 83
- Forks
- 39
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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 ;-)
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par SecretCacheObject.getResult et SecretCache.getCachedSecret, puis examinez comment les métadonnées de DescribeSecret sont mises en cache dans SecretCacheItem. La modification est terminée lorsque les appelants peuvent récupérer les métadonnées du secret mises en cache via SecretCache.describeSecret sans effectuer de requête supplémentaire auprès de AWS Secrets Manager ; ajoutez ou mettez à jour les tests Java pertinents pour vérifier ce comportement.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- aws, java
- Domaine
- security
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 45/100