Credential Admins manage the credentials for an instance or binding. The platform typically implements this interface keeping the implementation details of credential storage hidden from the service lifecycle and users.
Some clients are not able to support rotating credentials. For those clients, creating a new binding is recommended. Once the previous credentials are no longer in use, the old binding can be unbound.
Types
Functions
publish: func(
id: service-id,
credentials: list<credential>,
) -> result<_, error>
Publish new or refreshed credentials to the store for use by the service instance/binding. When rotating credentials, the previously valid credentials should be revoked after calling publish with the new credentials.
destroy: func(id: service-id) -> result<_, error>
Destroy credentials previously published for a service instance or binding. Valid credentials should be revoked before calling destroy.
WIT
/// Credential Admins manage the credentials for an instance or binding. The platform typically
/// implements this interface keeping the implementation details of credential storage hidden from
/// the service lifecycle and users.
///
/// Some clients are not able to support rotating credentials. For those clients, creating a new
/// binding is recommended. Once the previous credentials are no longer in use, the old binding can
/// be unbound.
interface credential-admin {
use types.{service-id, credential, error};
/// Publish new or refreshed credentials to the store for use by the service instance/binding.
/// When rotating credentials, the previously valid credentials should be revoked after calling
/// publish with the new credentials.
publish: func(id: service-id, credentials: list<credential>) -> result<_, error>;
/// Destroy credentials previously published for a service instance or binding. Valid
/// credentials should be revoked before calling destroy.
destroy: func(id: service-id) -> result<_, error>;
}