Use the POST /oauth/openIdConnect/policies endpoint to create a new OpenID Connect Policy. If the OpenID Connect policy is not properly configured, a 422 status code is returned along with a list of validation errors that must be corrected.

Status codes

Code Reason
201 Policy created.
400 The request was improperly formatted or contained invalid fields.
403 PingFederate does not have its OpenID connect protocol enabled. Operation not available.
422 Validation error(s) occurred.

OpenIdConnectPolicy - The set of attributes used to configure an OpenID Connect policy.

Property Type Description
accessTokenManagerRef * ResourceLink The access token manager associated with this Open ID Connect policy.
attributeContract * OpenIdConnectAttributeContract The list of attributes that will be returned to OAuth clients in response to requests received at the PingFederate UserInfo endpoint.
attributeMapping * AttributeMapping The attributes mapping from attribute sources to attribute targets.
id * string The policy ID used internally.
idTokenLifetime integer The ID Token Lifetime, in minutes. The default value is 5.
includeSHashInIdToken boolean Determines whether the State Hash should be included in the ID token.
includeSriInIdToken boolean Determines whether a Session Reference Identifier is included in the ID token.
includeUserInfoInIdToken boolean Determines whether the User Info is always included in the ID token.
name * string The name used for display in UI screens.
returnIdTokenOnRefreshGrant boolean Determines whether an ID Token should be returned when refresh grant is requested or not.
scopeAttributeMappings Map[string, ParameterValues] The attribute scope mappings from scopes to attribute names.

ResourceLink - A reference to a resource.

Property Type Description
id * string The ID of the resource.
location string A read-only URL that references the resource. If the resource is not currently URL-accessible, this property will be null.

OpenIdConnectAttributeContract - A set of attributes that will be returned to OAuth clients in response to requests received at the PingFederate UserInfo endpoint.

Property Type Description
coreAttributes array[OpenIdConnectAttribute] A list of read-only attributes (for example, sub) that are automatically populated by PingFederate.
extendedAttributes array[OpenIdConnectAttribute] A list of additional attributes.

OpenIdConnectAttribute - An attribute for the OpenID Connect returned to OAuth clients.

Property Type Description
includeInIdToken boolean Attribute is included in the ID Token.
includeInUserInfo boolean Attribute is included in the User Info
name * string The name of this attribute.

AttributeMapping - A list of mappings from attribute sources to attribute targets.

Property Type Description
attributeContractFulfillment * Map[string, AttributeFulfillmentValue] A list of mappings from attribute names to their fulfillment values.
attributeSources array[AttributeSource] A list of configured data stores to look up attributes from.
issuanceCriteria IssuanceCriteria The issuance criteria that this transaction must meet before the corresponding attribute contract is fulfilled.

AttributeSource - The configured settings to look up attributes from an associated data store.

Property Type Description
attributeContractFulfillment Map[string, AttributeFulfillmentValue] A list of mappings from attribute names to their fulfillment values. This field is only valid for the SP Connection’s Browser SSO mappings
dataStoreRef * ResourceLink Reference to the associated data store.
description string The description of this attribute source. The description needs to be unique amongst the attribute sources for the mapping.
Note: Required for APC-to-SP Adapter Mappings
id string The ID that defines this attribute source. Only alphanumeric characters allowed.
Note: Required for OpenID Connect policy attribute sources, OAuth IdP adapter mappings, OAuth access token mappings and APC-to-SP Adapter Mappings. IdP Connections will ignore this property since it only allows one attribute source to be defined per mapping. IdP-to-SP Adapter Mappings can contain multiple attribute sources.
type * DataStoreType The data store type of this attribute source.

AttributeFulfillmentValue - Defines how an attribute in an attribute contract should be populated.

Property Type Description
source * SourceTypeIdKey The attribute value source.
value * string The value for this attribute.

SourceTypeIdKey - A key that is meant to reference a source from which an attribute can be retrieved. This model is usually paired with a value which, depending on the SourceType, can be a hardcoded value or a reference to an attribute name specific to that SourceType. Not all values are applicable - a validation error will be returned for incorrect values.
For each SourceType, the value should be:
ACCOUNT_LINK - If account linking was enabled for the browser SSO, the value must be ‘Local User ID’, unless it has been overridden in PingFederate’s server configuration.
ADAPTER - The value is one of the attributes of the IdP Adapter.
ASSERTION - The value is one of the attributes coming from the SAML assertion.
AUTHENTICATION_POLICY_CONTRACT - The value is one of the attributes coming from an authentication policy contract.
LOCAL_IDENTITY_PROFILE - The value is one of the fields coming from a local identity profile.
CONTEXT - The value must be one of the following [‘TargetResource’ or ‘OAuthScopes’ or ‘ClientId’ or ‘AuthenticationCtx’ or ‘ClientIp’ or ‘Locale’ or ‘StsBasicAuthUsername’ or ‘StsSSLClientCertSubjectDN’ or ‘StsSSLClientCertChain’ or ‘VirtualServerId’ or ‘AuthenticatingAuthority’ or ‘DefaultPersistentGrantLifetime’]
CLAIMS - Attributes provided by the OIDC Provider.
CUSTOM_DATA_STORE - The value is one of the attributes returned by this custom data store.
EXPRESSION - The value is an OGNL expression.
EXTENDED_CLIENT_METADATA - The value is from an OAuth extended client metadata parameter. This source type is deprecated and has been replaced by EXTENDED_PROPERTIES.
EXTENDED_PROPERTIES - The value is from an OAuth Client’s extended property.
IDP_CONNECTION - The value is one of the attributes passed in by the IdP connection.
JDBC_DATA_STORE - The value is one of the column names returned from the JDBC attribute source.
LDAP_DATA_STORE - The value is one of the LDAP attributes supported by your LDAP data store.
MAPPED_ATTRIBUTES - The value is the name of one of the mapped attributes that is defined in the associated attribute mapping.
OAUTH_PERSISTENT_GRANT - The value is one of the attributes from the persistent grant.
PASSWORD_CREDENTIAL_VALIDATOR - The value is one of the attributes of the PCV.
NO_MAPPING - A placeholder value to indicate that an attribute currently has no mapped source.TEXT - A hardcoded value that is used to populate the corresponding attribute.
TOKEN - The value is one of the token attributes.
REQUEST - The value is from the request context such as the CIBA identity hint contract or the request contract for Ws-Trust.
TRACKED_HTTP_PARAMS - The value is from the original request parameters.
SUBJECT_TOKEN - The value is one of the OAuth 2.0 Token exchange subject_token attributes.
ACTOR_TOKEN - The value is one of the OAuth 2.0 Token exchange actor_token attributes.
TOKEN_EXCHANGE_PROCESSOR_POLICY - The value is one of the attributes coming from a Token Exchange Processor policy.

Property Type Description
id string The attribute source ID that refers to the attribute source that this key references. In some resources, the ID is optional and will be ignored. In these cases the ID should be omitted. If the source type is not an attribute source then the ID can be omitted.
type * SourceType The source type of this key.

LdapAttributeSource : AttributeSource - The configured settings used to look up attributes from a LDAP data store.

Property Type Description
attributeContractFulfillment Map[string, AttributeFulfillmentValue] A list of mappings from attribute names to their fulfillment values. This field is only valid for the SP Connection’s Browser SSO mappings
baseDn string The base DN to search from. If not specified, the search will start at the LDAP’s root.
binaryAttributeSettings Map[string, BinaryLdapAttributeSettings] The advanced settings for binary LDAP attributes.
dataStoreRef * ResourceLink Reference to the associated data store.
description string The description of this attribute source. The description needs to be unique amongst the attribute sources for the mapping.
Note: Required for APC-to-SP Adapter Mappings
id string The ID that defines this attribute source. Only alphanumeric characters allowed.
Note: Required for OpenID Connect policy attribute sources, OAuth IdP adapter mappings, OAuth access token mappings and APC-to-SP Adapter Mappings. IdP Connections will ignore this property since it only allows one attribute source to be defined per mapping. IdP-to-SP Adapter Mappings can contain multiple attribute sources.
memberOfNestedGroup boolean Set this to true to return transitive group memberships for the ‘memberOf’ attribute. This only applies for Active Directory data sources. All other data sources will be set to false.
searchFilter * string The LDAP filter that will be used to lookup the objects from the directory.
searchScope * LdapSearchScope Determines the node depth of the query.
type * DataStoreType The data store type of this attribute source.

BinaryLdapAttributeSettings - Binary settings for a LDAP attribute.

Property Type Description
binaryEncoding LdapAttrEncodingType Get the encoding type for this attribute. If not specified, the default is BASE64.

CustomAttributeSource : AttributeSource - The configured settings used to look up attributes from a custom data store.

Property Type Description
attributeContractFulfillment Map[string, AttributeFulfillmentValue] A list of mappings from attribute names to their fulfillment values. This field is only valid for the SP Connection’s Browser SSO mappings
dataStoreRef * ResourceLink Reference to the associated data store.
description string The description of this attribute source. The description needs to be unique amongst the attribute sources for the mapping.
Note: Required for APC-to-SP Adapter Mappings
filterFields array[FieldEntry] The list of fields that can be used to filter a request to the custom data store.
id string The ID that defines this attribute source. Only alphanumeric characters allowed.
Note: Required for OpenID Connect policy attribute sources, OAuth IdP adapter mappings, OAuth access token mappings and APC-to-SP Adapter Mappings. IdP Connections will ignore this property since it only allows one attribute source to be defined per mapping. IdP-to-SP Adapter Mappings can contain multiple attribute sources.
type * DataStoreType The data store type of this attribute source.

FieldEntry - A simple name value pair to represent a field entry.

Property Type Description
name * string The name of this field.
value string The value of this field. Whether or not the value is required will be determined by plugin validation checks.

JdbcAttributeSource : AttributeSource - The configured settings used to look up attributes from a JDBC data store.

Property Type Description
attributeContractFulfillment Map[string, AttributeFulfillmentValue] A list of mappings from attribute names to their fulfillment values. This field is only valid for the SP Connection’s Browser SSO mappings
dataStoreRef * ResourceLink Reference to the associated data store.
description string The description of this attribute source. The description needs to be unique amongst the attribute sources for the mapping.
Note: Required for APC-to-SP Adapter Mappings
filter * string The JDBC WHERE clause used to query your data store to locate a user record.
id string The ID that defines this attribute source. Only alphanumeric characters allowed.
Note: Required for OpenID Connect policy attribute sources, OAuth IdP adapter mappings, OAuth access token mappings and APC-to-SP Adapter Mappings. IdP Connections will ignore this property since it only allows one attribute source to be defined per mapping. IdP-to-SP Adapter Mappings can contain multiple attribute sources.
schema string Lists the table structure that stores information within a database. Some databases, such as Oracle, require a schema for a JDBC query. Other databases, such as MySQL, do not require a schema.
table * string The name of the database table. The name is used to construct the SQL query to retrieve data from the data store.
type * DataStoreType The data store type of this attribute source.

IssuanceCriteria - A list of criteria that determines whether a transaction (usually a SSO transaction) is continued. All criteria must pass in order for the transaction to continue.

Property Type Description
conditionalCriteria array[ConditionalIssuanceCriteriaEntry] A list of conditional issuance criteria where existing attributes must satisfy their conditions against expected values in order for the transaction to continue.
expressionCriteria array[ExpressionIssuanceCriteriaEntry] A list of expression issuance criteria where the OGNL expressions must evaluate to true in order for the transaction to continue.

ConditionalIssuanceCriteriaEntry - An issuance criterion that checks a source attribute against a particular condition and the expected value. If the condition is true then this issuance criterion passes, otherwise the criterion fails.

Property Type Description
attributeName * string The name of the attribute to use in this issuance criterion.
condition * ConditionType The condition that will be applied to the source attribute’s value and the expected value.
errorResult string The error result to return if this issuance criterion fails. This error result will show up in the PingFederate server logs.
source * SourceTypeIdKey The source of the attribute.
value * string The expected value of this issuance criterion.

ExpressionIssuanceCriteriaEntry - An issuance criterion that uses a Boolean return value from an OGNL expression to determine whether or not it passes.

Property Type Description
errorResult string The error result to return if this issuance criterion fails. This error result will show up in the PingFederate server logs.
expression * string The OGNL expression to evaluate.

ParameterValues - Parameter Values.

Property Type Description
values array[string] A List of values