-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Updated documentation about protecting API endpoint (#36)
- Loading branch information
Showing
3 changed files
with
29 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
# Private Registry Authentication | ||
|
||
To authenticate against private registries, the auth token can be inserted into the `terraform_registry_host` postgres table. | ||
To insert credentials for private registries, the auth token can be updated with an API call. | ||
|
||
``` sql | ||
insert into "terraform_registry_host" ("hostname", "auth_token") | ||
values ("example-private-registry.com", "xxxxxx") | ||
``` bash | ||
curl -X POST \ | ||
-d '{ "data": { "token": "xxxx"} }' \ | ||
-H 'Content-Type: application/json' \ | ||
https://localhost:9443/api/v1/credentials/example.com | ||
``` | ||
|
||
An API call to do this is planned. | ||
Likewise, to delete a credential, the auth token can be deleted via a `DELETE` request. | ||
|
||
``` | ||
curl -X DELETE https://localhost:9443/api/v1/credentials/example.com | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters