aws / aws/aws-secretsmanager-caching-java
Providing access to secret's metadata
- Lenguaje dominante
- Java
- Estrellas
- 83
- Forks
- 39
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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 ;-)
Guía de contribución
Línea de trabajo
Comienza con SecretCacheObject.getResult y SecretCache.getCachedSecret, y luego inspecciona cómo se almacenan en caché los metadatos de DescribeSecret en SecretCacheItem. El cambio estará completo cuando los llamadores puedan recuperar los metadatos del secreto almacenados en caché mediante SecretCache.describeSecret sin realizar una solicitud adicional a AWS Secrets Manager; añade o actualiza las pruebas de Java pertinentes para verificar ese comportamiento.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- aws, java
- Área
- security
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 45/100