Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
more audit logs
Browse files Browse the repository at this point in the history
  • Loading branch information
honnix committed Apr 28, 2017
1 parent 537c1e9 commit d3057df
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,10 @@ public String start(WorkflowInstance workflowInstance, RunSpec runSpec) throws I

private void ensureSecrets(WorkflowInstance workflowInstance, RunSpec runSpec) {
if (runSpec.serviceAccount().isPresent()) {
final String secretName = buildSecretName(runSpec.serviceAccount().get());
final String serviceAccount = runSpec.serviceAccount().get();
final String secretName = buildSecretName(serviceAccount);
final Secret secret = client.secrets().withName(secretName).get();
if (secret == null) {
final String serviceAccount = runSpec.serviceAccount().get();

final ServiceAccountKey jsonKey;
final ServiceAccountKey p12Key;
try {
Expand Down Expand Up @@ -189,7 +188,11 @@ private void ensureSecrets(WorkflowInstance workflowInstance, RunSpec runSpec) {
.endMetadata()
.withData(keys)
.build());
LOG.info("[AUDIT] Secret {} created for service account {}", secretName, serviceAccount);
LOG.info("[AUDIT] Secret {} created for {} referred to by workflow {}", secretName,
serviceAccount, workflowInstance.workflowId());
} else {
LOG.info("[AUDIT] Workflow {} refers to secret {} of {}", workflowInstance.workflowId(),
secretName, serviceAccount);
}
}

Expand Down

0 comments on commit d3057df

Please sign in to comment.