@Service public class SecretService extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_TYPE
Default secret type.
|
Constructor and Description |
---|
SecretService(OneOpsConfig config) |
Modifier and Type | Method and Description |
---|---|
CreateOrUpdateSecretRequestV2 |
makeCreateOrUpdateReq(SecretRequest secret)
Helper method for create/update request.
|
List<String> |
normalize(Collection<String> uniqSecretNames)
Normalize a list of unique secret names.
|
GroupDetailResponseV2 |
normalize(GroupDetailResponseV2 group)
Normalize the unique secret names in group details response.
|
SecretDetailResponseV2 |
normalize(SecretDetailResponseV2 secret)
Normalize the unique secret names in secret response.
|
SecretRequest |
validateAndEnrichReq(SecretRequest req,
AppSecret appSecret,
OneOpsUser user)
Validate and enrich
SecretRequest for it's content and other metadata. |
public static final String DEFAULT_TYPE
public SecretService(OneOpsConfig config)
public SecretRequest validateAndEnrichReq(SecretRequest req, AppSecret appSecret, OneOpsUser user) throws IOException
SecretRequest
for it's content and other metadata. Keywhiz expects
the secret content to be Base64 encoded string.req
- Secret request.appSecret
- App secret details.user
- OneOps user.SecretRequest
IOException
public CreateOrUpdateSecretRequestV2 makeCreateOrUpdateReq(SecretRequest secret)
secret
- Secret request user input.CreateOrUpdateSecretRequestV2
public List<String> normalize(Collection<String> uniqSecretNames)
uniqSecretNames
- collection of unique secret names.public GroupDetailResponseV2 normalize(GroupDetailResponseV2 group)
group
- GroupDetailResponseV2
public SecretDetailResponseV2 normalize(SecretDetailResponseV2 secret)
secret
- SecretDetailResponseV2
Copyright © 2018 Walmart, Inc.. All rights reserved.