Set upstream credentials
Sets the credentials the firewall uses for the upstream. Credentials are write-only.
AuthorizationBearer <token>A personal or service access token, sent as Authorization: Bearer <token>. See access tokens.
namespace*stringThe namespace id.
firewall*stringThe firewall id.
id*stringThe upstream id.
application/json- body
Write-only. In responses every value that is set is replaced by a redaction placeholder.
password?stringPassword for HTTP Basic authentication.
token?stringAccess token, usually sent as a bearer token. Used instead of the username and password when both are set.
username?stringUsername for HTTP Basic authentication.
The upstream, with its credentials redacted.
application/json- response
A registry the firewall fetches packages from.
id*stringThe upstream id, unique within the firewall.
endpoint*stringThe registry's base URL.
credentials*Credentials the firewall sends to the registry. Write-only: responses show a redaction placeholder for each value that is set. Change them with the set-credentials operation.
internal*booleanWhether the registry hosts your own packages rather than public ones. Rules can target internal or external upstreams.
cached*booleanWhether package metadata from this upstream is cached. Only internal upstreams can be cached.
artifactCredentials?array<>Credentials for hosts the upstream's artifacts are downloaded from, when that is not the registry's own host.
curl -X PUT 'https://eu-sov-1.bytesafecloud.eu/v1/my-namespace-id/config/my-firewall-id/upstreams/string/credentials' \ -H 'Content-Type: application/json' \ -d '{ "token": "upstream-registry-token"}'{ "id": "npmjs", "endpoint": "https://registry.npmjs.org", "credentials": { "token": "1F56ED4E-D401-49E4-B40C-0B7B8411BAD6" }, "internal": false, "cached": false}