Skip to content

Commit 707a62c

Browse files
authored
chore: remove prefix from CAS (#130)
Signed-off-by: Miguel Martinez Trivino <[email protected]>
1 parent 27077d1 commit 707a62c

File tree

7 files changed

+99
-96
lines changed

7 files changed

+99
-96
lines changed

app/artifact-cas/cmd/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ func newGCPCredentialsManager(conf *conf.Credentials_GCPSecretManager, l log.Log
191191
opts := &gcp.NewManagerOpts{
192192
ProjectID: conf.ProjectId,
193193
ServiceAccountKey: conf.ServiceAccountKey,
194-
SecretPrefix: conf.SecretPrefix,
195194
Logger: l,
196195
}
197196

app/artifact-cas/configs/samples/config.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,17 @@ credentials_service:
1818
address: ${VAULT_ADDRESS:http://0.0.0.0:8200}
1919
token: ${VAULT_TOKEN:notasecret}
2020

21+
# aws_secret_manager:
22+
# creds:
23+
# access_key: not-a-key
24+
# secret_key: not-a-secret
25+
# region: us-east-1
26+
27+
# gcp_secret_manager:
28+
# project_id: 522312304548
29+
# auth_key: "./configs/gcp_auth_key.json"
30+
2131
observability:
2232
sentry:
2333
dsn: "http://sentryDomain"
24-
environment: development # production
25-
26-
## gcp_secret_manager:
27-
## project_id: 522312304548
28-
## auth_key: "./configs/gcp_auth_key.json"
29-
## secret_prefix: "pre-"
34+
environment: development # production

app/artifact-cas/internal/conf/conf.pb.go

Lines changed: 13 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/artifact-cas/internal/conf/conf.proto

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -63,38 +63,37 @@ message Auth {
6363

6464
// Where the credentials to access the backends are stored
6565
message Credentials {
66-
oneof backend {
67-
AWSSecretManager aws_secret_manager = 1;
68-
Vault vault = 2;
69-
GCPSecretManager gcp_secret_manager = 3;
70-
}
66+
oneof backend {
67+
AWSSecretManager aws_secret_manager = 1;
68+
Vault vault = 2;
69+
GCPSecretManager gcp_secret_manager = 3;
70+
}
7171

72-
// Top level is deprecated now
73-
message AWSSecretManager {
74-
Creds creds = 1;
75-
string region = 2;
72+
// Top level is deprecated now
73+
message AWSSecretManager {
74+
Creds creds = 1;
75+
string region = 2;
7676

77-
message Creds {
78-
string access_key = 1;
79-
string secret_key = 2;
80-
}
77+
message Creds {
78+
string access_key = 1;
79+
string secret_key = 2;
8180
}
81+
}
8282

83-
message Vault {
84-
// TODO: Use application role auth instead
85-
string token = 1;
86-
// Instance address, including port
87-
// i.e "http://127.0.0.1:8200"
88-
string address = 2;
89-
// mount path of the kv engine, default /secret
90-
string mount_path = 3;
91-
}
83+
message Vault {
84+
// TODO: Use application role auth instead
85+
string token = 1;
86+
// Instance address, including port
87+
// i.e "http://127.0.0.1:8200"
88+
string address = 2;
89+
// mount path of the kv engine, default /secret
90+
string mount_path = 3;
91+
}
9292

93-
message GCPSecretManager {
94-
// project number
95-
string project_id = 1;
96-
// service account key
97-
string service_account_key = 2;
98-
string secret_prefix = 3;
99-
}
93+
message GCPSecretManager {
94+
// project number
95+
string project_id = 1;
96+
// service account key
97+
string service_account_key = 2;
98+
}
10099
}

app/controlplane/configs/samples/config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,8 @@ credentials_service:
2929
# secret_key: not-a-secret
3030
# region: us-east-1
3131
# secret_prefix: i-e chainloop-devel
32+
33+
# gcp_secret_manager:
34+
# project_id: 522312304548
35+
# auth_key: "./configs/gcp_auth_key.json"
36+
# secret_prefix: "pre-"

app/controlplane/internal/conf/conf.pb.go

Lines changed: 8 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/controlplane/internal/conf/conf.proto

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -92,40 +92,43 @@ message Auth {
9292
}
9393

9494
message Credentials {
95-
oneof backend {
96-
AWSSecretManager aws_secret_manager = 1;
97-
Vault vault = 2;
98-
GCPSecretManager gcp_secret_manager = 3;
99-
}
95+
oneof backend {
96+
AWSSecretManager aws_secret_manager = 1;
97+
Vault vault = 2;
98+
GCPSecretManager gcp_secret_manager = 3;
99+
}
100100

101-
// Top level is deprecated now
102-
message AWSSecretManager {
103-
Creds creds = 1;
104-
string region = 2;
105-
string secret_prefix = 3;
101+
// Top level is deprecated now
102+
message AWSSecretManager {
103+
Creds creds = 1;
104+
string region = 2;
105+
// Secret prefix to be prepended during secret write
106+
string secret_prefix = 3;
106107

107-
message Creds {
108-
string access_key = 1;
109-
string secret_key = 2;
110-
}
108+
message Creds {
109+
string access_key = 1;
110+
string secret_key = 2;
111111
}
112+
}
112113

113-
message Vault {
114-
// TODO: Use application role auth instead
115-
string token = 1;
116-
// Instance address, including port
117-
// i.e "http://127.0.0.1:8200"
118-
string address = 2;
119-
// mount path of the kv engine, default /secret
120-
string mount_path = 3;
121-
string secret_prefix = 4;
122-
}
114+
message Vault {
115+
// TODO: Use application role auth instead
116+
string token = 1;
117+
// Instance address, including port
118+
// i.e "http://127.0.0.1:8200"
119+
string address = 2;
120+
// mount path of the kv engine, default /secret
121+
string mount_path = 3;
122+
// Secret prefix to be prepended during secret write
123+
string secret_prefix = 4;
124+
}
123125

124-
message GCPSecretManager {
125-
// project number
126-
string project_id = 1;
127-
// service account key
128-
string service_account_key = 2;
129-
string secret_prefix = 3;
130-
}
126+
message GCPSecretManager {
127+
// project number
128+
string project_id = 1;
129+
// service account key
130+
string service_account_key = 2;
131+
// Secret prefix to be prepended during secret write
132+
string secret_prefix = 3;
133+
}
131134
}

0 commit comments

Comments
 (0)