import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * With this resource, you can set up APIs that can be consumed from your authorized applications. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * * const myResourceServer = new auth0.ResourceServer("my_resource_server", { * accessToken: { * claimsMapping: { * customClaims: [ * { * name: "country", * expression: "anonymous_session.metadata.country", * }, * { * name: "city", * expression: "anonymous_session.metadata.city", * }, * ], * }, * }, * tokenEncryption: { * encryptionKey: { * name: "keyname", * algorithm: "RSA-OAEP-256", * pem: `-----BEGIN CERTIFICATE----- * MIIFWDCCA0ACCQDXqpBo3R...G9w0BAQsFADBuMQswCQYDVQQGEwJl * -----END CERTIFICATE----- * `, * }, * format: "compact-nested-jwe", * }, * proofOfPossession: { * mechanism: "mtls", * required: true, * }, * subjectTypeAuthorization: { * user: { * policy: "allow_all", * }, * client: { * policy: "require_client_grant", * }, * anonymousUser: { * policy: "require_client_grant", * }, * }, * authorizationDetails: [ * { * type: "payment", * }, * { * type: "non-payment", * }, * ], * name: "Example Resource Server (Managed by Terraform)", * identifier: "https://api.example.com", * signingAlg: "RS256", * allowOfflineAccess: true, * allowOnlineAccess: true, * allowOnlineAccessWithEphemeralSessions: false, * requireConsentNonRepudiation: true, * tokenLifetime: 8600, * skipConsentForVerifiableFirstPartyClients: true, * consentPolicy: "transactional-authorization-with-mfa", * tokenLifetimeForAnonymousAccessTokens: 86400, * }); * // Sample OIN resource server configuration * const oktaOinExpressConfigurationApi = new auth0.ResourceServer("okta_oin_express_configuration_api", { * proofOfPossession: { * disable: true, * mechanism: null, * required: false, * }, * tokenEncryption: { * disable: true, * format: null, * }, * identifier: "urn:auth0:express-configure", * name: "Okta OIN Express Configuration API", * signingAlg: "RS256", * signingSecret: null, * skipConsentForVerifiableFirstPartyClients: false, * tokenDialect: null, * tokenLifetime: 86400, * verificationLocation: null, * }); * // Default permissions for third-party applications, set via a client grant. * const default3pGrant = new auth0.ClientGrant("default_3p_grant", { * defaultFor: "third_party_clients", * audience: myResourceServer.identifier, * scopes: ["read:foo"], * }); * ``` * * ## Import * * Existing resource servers can be imported using their ID. * * Example: * * ```sh * $ pulumi import auth0:index/resourceServer:ResourceServer my_resource_server "XXXXXXXXXXXXXXXXXXXXXXX" * ``` */ export declare class ResourceServer extends pulumi.CustomResource { /** * Get an existing ResourceServer resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ResourceServerState, opts?: pulumi.CustomResourceOptions): ResourceServer; /** * Check whether an existing ResourceServer resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: ResourceServerState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of ResourceServer. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ResourceServer; /** * Configuration for the access tokens issued for this resource server. Remove the block to clear the configuration on the API. (EA only) */ readonly accessToken: pulumi.Output; /** * Indicates whether refresh tokens can be issued for this resource server. */ readonly allowOfflineAccess: pulumi.Output; /** * Indicates whether Online Refresh Tokens can be issued for this resource server. (EA Only) */ readonly allowOnlineAccess: pulumi.Output; /** * Indicates whether Online Refresh Tokens can be issued even when sessions are configured as ephemeral. (EA Only) */ readonly allowOnlineAccessWithEphemeralSessions: pulumi.Output; /** * Authorization details for this resource server. */ readonly authorizationDetails: pulumi.Output; /** * Authorization policy for the resource server.(EA Only) */ readonly authorizationPolicy: pulumi.Output; /** * The ID of the client associated with this resource server. If a client has been created and linked to this resource server, this field will be populated with that client's ID. */ readonly clientId: pulumi.Output; /** * Consent policy for this resource server. Options include `transactional-authorization-with-mfa`, or `null` to disable. */ readonly consentPolicy: pulumi.Output; /** * If this setting is enabled, RBAC authorization policies will be enforced for this API. Role and permission assignments will be evaluated during the login transaction. */ readonly enforcePolicies: pulumi.Output; /** * Unique identifier for the resource server. Used as the audience parameter for authorization calls. Cannot be changed once set. */ readonly identifier: pulumi.Output; /** * Indicates whether this resource server is a special resource server created by Auth0. It cannot be modified or deleted directly. */ readonly isSystem: pulumi.Output; /** * Friendly name for the resource server. Cannot include `<` or `>` characters. */ readonly name: pulumi.Output; /** * Configuration settings for proof-of-possession for this resource server. */ readonly proofOfPossession: pulumi.Output; /** * When true, the authorization server will reject consent decisions that do not include a valid signature and kid. (EA Only) */ readonly requireConsentNonRepudiation: pulumi.Output; /** * Algorithm used to sign JWTs. Options include `HS256`, `RS256`, and `PS256`. */ readonly signingAlg: pulumi.Output; /** * Secret used to sign tokens when using symmetric algorithms (HS256). */ readonly signingSecret: pulumi.Output; /** * Indicates whether to skip user consent for applications flagged as first party. */ readonly skipConsentForVerifiableFirstPartyClients: pulumi.Output; /** * Authorization policies for user and client flows. */ readonly subjectTypeAuthorization: pulumi.Output; /** * Dialect of access tokens that should be issued for this resource server. Options include `accessToken`, `rfc9068Profile`, `accessTokenAuthz`, and `rfc9068ProfileAuthz`. `accessToken` is a JWT containing standard Auth0 claims. `rfc9068Profile` is a JWT conforming to the IETF JWT Access Token Profile. `accessTokenAuthz` is a JWT containing standard Auth0 claims, including RBAC permissions claims. `rfc9068ProfileAuthz` is a JWT conforming to the IETF JWT Access Token Profile, including RBAC permissions claims. RBAC permissions claims are available if RBAC (`enforcePolicies`) is enabled for this API. For more details, refer to [Access Token Profiles](https://auth0.com/docs/secure/tokens/access-tokens/access-token-profiles). */ readonly tokenDialect: pulumi.Output; /** * Configuration for JSON Web Encryption(JWE) of tokens for this resource server. */ readonly tokenEncryption: pulumi.Output; /** * Number of seconds during which access tokens issued for this resource server from the token endpoint remain valid. */ readonly tokenLifetime: pulumi.Output; /** * Number of seconds during which anonymous-session access tokens issued for this resource server remain valid. Must be between 86400 (1 day) and 2592000 (30 days) when present. Removing this attribute clears the value on the API. (EA only) */ readonly tokenLifetimeForAnonymousAccessTokens: pulumi.Output; /** * Number of seconds during which access tokens issued for this resource server via implicit or hybrid flows remain valid. Cannot be greater than the `tokenLifetime` value. */ readonly tokenLifetimeForWeb: pulumi.Output; /** * Type of the resource server. Only `universalCommerceProtocolServer` is supported, and only one typed resource server is allowed per tenant. Removing this attribute clears the type on the API, which requires that any `dev.ucp` scopes on the resource server are removed first. If they are still present, the apply warns and keeps the type; apply again once the scopes are gone. (EA only). */ readonly type: pulumi.Output; /** * URL from which to retrieve JWKs for this resource server. Used for verifying the JWT sent to Auth0 for token introspection. */ readonly verificationLocation: pulumi.Output; /** * Create a ResourceServer resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ResourceServerArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ResourceServer resources. */ export interface ResourceServerState { /** * Configuration for the access tokens issued for this resource server. Remove the block to clear the configuration on the API. (EA only) */ accessToken?: pulumi.Input; /** * Indicates whether refresh tokens can be issued for this resource server. */ allowOfflineAccess?: pulumi.Input; /** * Indicates whether Online Refresh Tokens can be issued for this resource server. (EA Only) */ allowOnlineAccess?: pulumi.Input; /** * Indicates whether Online Refresh Tokens can be issued even when sessions are configured as ephemeral. (EA Only) */ allowOnlineAccessWithEphemeralSessions?: pulumi.Input; /** * Authorization details for this resource server. */ authorizationDetails?: pulumi.Input[] | undefined>; /** * Authorization policy for the resource server.(EA Only) */ authorizationPolicy?: pulumi.Input; /** * The ID of the client associated with this resource server. If a client has been created and linked to this resource server, this field will be populated with that client's ID. */ clientId?: pulumi.Input; /** * Consent policy for this resource server. Options include `transactional-authorization-with-mfa`, or `null` to disable. */ consentPolicy?: pulumi.Input; /** * If this setting is enabled, RBAC authorization policies will be enforced for this API. Role and permission assignments will be evaluated during the login transaction. */ enforcePolicies?: pulumi.Input; /** * Unique identifier for the resource server. Used as the audience parameter for authorization calls. Cannot be changed once set. */ identifier?: pulumi.Input; /** * Indicates whether this resource server is a special resource server created by Auth0. It cannot be modified or deleted directly. */ isSystem?: pulumi.Input; /** * Friendly name for the resource server. Cannot include `<` or `>` characters. */ name?: pulumi.Input; /** * Configuration settings for proof-of-possession for this resource server. */ proofOfPossession?: pulumi.Input; /** * When true, the authorization server will reject consent decisions that do not include a valid signature and kid. (EA Only) */ requireConsentNonRepudiation?: pulumi.Input; /** * Algorithm used to sign JWTs. Options include `HS256`, `RS256`, and `PS256`. */ signingAlg?: pulumi.Input; /** * Secret used to sign tokens when using symmetric algorithms (HS256). */ signingSecret?: pulumi.Input; /** * Indicates whether to skip user consent for applications flagged as first party. */ skipConsentForVerifiableFirstPartyClients?: pulumi.Input; /** * Authorization policies for user and client flows. */ subjectTypeAuthorization?: pulumi.Input; /** * Dialect of access tokens that should be issued for this resource server. Options include `accessToken`, `rfc9068Profile`, `accessTokenAuthz`, and `rfc9068ProfileAuthz`. `accessToken` is a JWT containing standard Auth0 claims. `rfc9068Profile` is a JWT conforming to the IETF JWT Access Token Profile. `accessTokenAuthz` is a JWT containing standard Auth0 claims, including RBAC permissions claims. `rfc9068ProfileAuthz` is a JWT conforming to the IETF JWT Access Token Profile, including RBAC permissions claims. RBAC permissions claims are available if RBAC (`enforcePolicies`) is enabled for this API. For more details, refer to [Access Token Profiles](https://auth0.com/docs/secure/tokens/access-tokens/access-token-profiles). */ tokenDialect?: pulumi.Input; /** * Configuration for JSON Web Encryption(JWE) of tokens for this resource server. */ tokenEncryption?: pulumi.Input; /** * Number of seconds during which access tokens issued for this resource server from the token endpoint remain valid. */ tokenLifetime?: pulumi.Input; /** * Number of seconds during which anonymous-session access tokens issued for this resource server remain valid. Must be between 86400 (1 day) and 2592000 (30 days) when present. Removing this attribute clears the value on the API. (EA only) */ tokenLifetimeForAnonymousAccessTokens?: pulumi.Input; /** * Number of seconds during which access tokens issued for this resource server via implicit or hybrid flows remain valid. Cannot be greater than the `tokenLifetime` value. */ tokenLifetimeForWeb?: pulumi.Input; /** * Type of the resource server. Only `universalCommerceProtocolServer` is supported, and only one typed resource server is allowed per tenant. Removing this attribute clears the type on the API, which requires that any `dev.ucp` scopes on the resource server are removed first. If they are still present, the apply warns and keeps the type; apply again once the scopes are gone. (EA only). */ type?: pulumi.Input; /** * URL from which to retrieve JWKs for this resource server. Used for verifying the JWT sent to Auth0 for token introspection. */ verificationLocation?: pulumi.Input; } /** * The set of arguments for constructing a ResourceServer resource. */ export interface ResourceServerArgs { /** * Configuration for the access tokens issued for this resource server. Remove the block to clear the configuration on the API. (EA only) */ accessToken?: pulumi.Input; /** * Indicates whether refresh tokens can be issued for this resource server. */ allowOfflineAccess?: pulumi.Input; /** * Indicates whether Online Refresh Tokens can be issued for this resource server. (EA Only) */ allowOnlineAccess?: pulumi.Input; /** * Indicates whether Online Refresh Tokens can be issued even when sessions are configured as ephemeral. (EA Only) */ allowOnlineAccessWithEphemeralSessions?: pulumi.Input; /** * Authorization details for this resource server. */ authorizationDetails?: pulumi.Input[] | undefined>; /** * Authorization policy for the resource server.(EA Only) */ authorizationPolicy?: pulumi.Input; /** * Consent policy for this resource server. Options include `transactional-authorization-with-mfa`, or `null` to disable. */ consentPolicy?: pulumi.Input; /** * If this setting is enabled, RBAC authorization policies will be enforced for this API. Role and permission assignments will be evaluated during the login transaction. */ enforcePolicies?: pulumi.Input; /** * Unique identifier for the resource server. Used as the audience parameter for authorization calls. Cannot be changed once set. */ identifier: pulumi.Input; /** * Friendly name for the resource server. Cannot include `<` or `>` characters. */ name?: pulumi.Input; /** * Configuration settings for proof-of-possession for this resource server. */ proofOfPossession?: pulumi.Input; /** * When true, the authorization server will reject consent decisions that do not include a valid signature and kid. (EA Only) */ requireConsentNonRepudiation?: pulumi.Input; /** * Algorithm used to sign JWTs. Options include `HS256`, `RS256`, and `PS256`. */ signingAlg?: pulumi.Input; /** * Secret used to sign tokens when using symmetric algorithms (HS256). */ signingSecret?: pulumi.Input; /** * Indicates whether to skip user consent for applications flagged as first party. */ skipConsentForVerifiableFirstPartyClients?: pulumi.Input; /** * Authorization policies for user and client flows. */ subjectTypeAuthorization?: pulumi.Input; /** * Dialect of access tokens that should be issued for this resource server. Options include `accessToken`, `rfc9068Profile`, `accessTokenAuthz`, and `rfc9068ProfileAuthz`. `accessToken` is a JWT containing standard Auth0 claims. `rfc9068Profile` is a JWT conforming to the IETF JWT Access Token Profile. `accessTokenAuthz` is a JWT containing standard Auth0 claims, including RBAC permissions claims. `rfc9068ProfileAuthz` is a JWT conforming to the IETF JWT Access Token Profile, including RBAC permissions claims. RBAC permissions claims are available if RBAC (`enforcePolicies`) is enabled for this API. For more details, refer to [Access Token Profiles](https://auth0.com/docs/secure/tokens/access-tokens/access-token-profiles). */ tokenDialect?: pulumi.Input; /** * Configuration for JSON Web Encryption(JWE) of tokens for this resource server. */ tokenEncryption?: pulumi.Input; /** * Number of seconds during which access tokens issued for this resource server from the token endpoint remain valid. */ tokenLifetime?: pulumi.Input; /** * Number of seconds during which anonymous-session access tokens issued for this resource server remain valid. Must be between 86400 (1 day) and 2592000 (30 days) when present. Removing this attribute clears the value on the API. (EA only) */ tokenLifetimeForAnonymousAccessTokens?: pulumi.Input; /** * Number of seconds during which access tokens issued for this resource server via implicit or hybrid flows remain valid. Cannot be greater than the `tokenLifetime` value. */ tokenLifetimeForWeb?: pulumi.Input; /** * Type of the resource server. Only `universalCommerceProtocolServer` is supported, and only one typed resource server is allowed per tenant. Removing this attribute clears the type on the API, which requires that any `dev.ucp` scopes on the resource server are removed first. If they are still present, the apply warns and keeps the type; apply again once the scopes are gone. (EA only). */ type?: pulumi.Input; /** * URL from which to retrieve JWKs for this resource server. Used for verifying the JWT sent to Auth0 for token introspection. */ verificationLocation?: pulumi.Input; } //# sourceMappingURL=resourceServer.d.ts.map