Skip to content

Commit

Permalink
all: Update credentials format
Browse files Browse the repository at this point in the history
Update credentials format to match upstream KBC URI change

Fixes: confidential-containers#826
Signed-off-by: stevenhorsman <[email protected]>
  • Loading branch information
stevenhorsman authored and bpradipt committed Apr 17, 2023
1 parent 4ab0ed2 commit c425542
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/registries-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Registry authentication file can be provided either statically or at runtime.
```
cat <<EOF | tee aa-offline_fs_kbc-resources.json
{
"Credential": "${AUTHFILE}"
"default/credential/test": "${AUTHFILE}"
}
EOF
```
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/cloudinit/cloudconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (config *CloudConfig) Generate() (string, error) {

func AuthJSONToResourcesJSON(text string) string {
var buf bytes.Buffer
tpl := template.Must(template.New("cerdTpl").Parse("{\"Credential\":\"{{.EncodedAuth}}\"}"))
tpl := template.Must(template.New("cerdTpl").Parse("{\"default/credential/test\":\"{{.EncodedAuth}}\"}"))
if err := tpl.Execute(&buf, struct{ EncodedAuth string }{base64.StdEncoding.EncodeToString([]byte(text))}); err != nil {
return ""
}
Expand Down

0 comments on commit c425542

Please sign in to comment.