Configuring OIDC Single Sign-on
Set up PingFederate
Configurate PingFederate
- Sign in to PingFederate console at
https://service-ip:service-port
, whereservice-ip
andservice-port
refer to the IP address and port of the machine hosting PingFederate server. - In homepage, navigate to
SYSTEM
tab and selectServer
from the left sidebar. - Select
Protocol Settings
, enterBase URL
,SAML 2.0 ENTITY ID,
andSAML 1.X ISSUER/AUDIENCE
, then clickSave
to complete.

Set up simple Password Credential Validators
- In homepage, navigate to
SYSTEM
tab and click onPassword Credential Validators
.

- Click
Create New Instance
. - Enter
INSTANCE NAME
andINSTANCE ID
, selectSimple Username Password Credential Validator
forTYPE
, and clickNext
.

- In
Create Credential Validator Instance
page, clickAdd a new row to 'Users'.

- Enter
Username
,Password
, andConfirm Password
, then clickUpdate
andNext
.

- Review all selected options in
Summary
tab, and clickSave
.
Set up a simple IdP Adapter
- In homepage, navigate to
AUTHENTICATION
tab and click onIdP Adapters
.

- Click
Create New Instance
. - Enter
INSTANCE NAME
,INSTANCE ID,
and selectHTML Form IdP Adapter
forTYPE
. ClickNext
.

- Click
Add a new row to 'Credential Validators'
.

- Select the Password Credential Validator created in the previous stage, that is "Simple MDCore PCV", then click
Update
andNext
.

- Click
Next
onExtended Contract
tab. - In
Adapter Attributes
tab, toggleusername
attribute underPseudonym
column, and clickNext
.

- Click
Next
onAdapter Contract Mapping
tab. - Review all selected options in
Summary
tab and clickSave
to complete.
Set up Signing, Decryption Keys and Certificates
- In homepage, navigate to
SECURITY
tab and selectSigning & Decryption Keys & Certificates
.

- Click
Create New
. - Enter
COMMON NAME
,ORGANIZATION
, andCOUNTRY
, along with any other necessary information, then clickNext
.

- Review all selected options in
Summary
tab and clickSave
to complete.
Set up Authentication Policies
- In homepage, navigate to
AUTHENTICATION
tab, and clickPolicies
.

- Click
Add Policy
in the next page. - Enter
NAME
, select the IdP Adapter from the previous stage forPOLICY
. ClickDone
forFAIL
andSUCCESS
options. Once finished, clickDone
.

- Ensure the new policy is enabled, then click
Save
to complete.

Set up Policy Contracts
- In homepage, navigate to
AUTHENTICATION
tab. SelectPolicies
icon on the left sidebar, then clickPolicy Contracts
.

- Press
Create New Contract
on the next page. - In
Contract Info
step, enterCONTRACT NAME
and clickNext
.

- In
Contract Attributes
step, navigate toExtend the Contract
, fill in claims that will be returned to MetaDefender Core, clickAdd
to add the claim, and thenNext
.

- Review all selected options in
Summary
tab, then clickSave
to complete.
Set up Policy Sessions
- In homepage, navigate to
AUTHENTICATION
tab and clickSessions
.

- In
Sessions
menu, findOVERRIDES
subtab. - Select "MD Core Adapter" for Authentication Source, tick
Enable Sessions
, and clickAdd
to include the authentication source.

- Click
Save
to complete.
Set up Policy Contract Grant Mapping
- In homepage, navigate to
AUTHENTICATION
and clickPolicy Contract Grant Mapping
.

- Select the Policy contract in previous stage, then click
Add Mapping
.

- In
Attribute Sources & User Lookup
step, clickNext
. - In
Contract Fulfillment
step, select the appropriate mapping forSource
andValue
columns, then clickNext
.

- Click
Next
inIssuance Criteria
step. - Review all selected options in
Summary
tab, then clickSave
to complete.
Set up IdP Adapter Grant Mapping
- In homepage, navigate to
AUTHENTICATION
, selectOAUTH
in the left side bar, and clickIdP Adapter Grant Mapping
. - Under
SOURCE ADAPTER INSTANCE
, select the IdP Adapter that was set up in the previous stage and clickAdd Mapping
.

- Click
Next
inAttribute Sources & User Lookup
step. - In
IdP Adapter Mapping
step, select the appropriate mapping forSource
,Value
, and clickNext
.

- Click
Next
inIssuance Criteria
step. - Review all selected options in
Summary
tab, then clickSave
to complete.
Set up Resource Owner Credentials Grant Mapping
- In homepage, navigate to
AUTHENTICATION
, selectOAUTH
in the left side bar, and clickResource Owner Credentials Grant Mapping
. - Under
SOURCE PASSWORD VALIDATOR INSTANCE
, select the Password Credential Validator that was set up in the previous stage, which is "Simple MDCore PCV", and clickAdd Mapping
.

- Click
Next
inAttribute Sources & User Lookup
step. - In
Contract Fulfillment
step, choose the appropriate mapping forSource
andValue
, and then clickNext
.

- Click
Next
inIssuance Criteria
step. - Review all selected options in
Summary
tab, then clickSave
to complete.
Set up Access Token Management
- In homepage, navigate to
APPLICATIONS
, and clickAccess Token Management
.

- Click
Create New Instance
. - Enter
INSTANCE NAME,
INSTANCE ID
, and selectJSON Web Tokens
forTYPE
. ClickNext
to continue.

- In
Instance Configuration
step, clickAdd a new row to 'Symmetric Keys'
underSymmetric Keys
.

- Enter
Key ID
,Key
, and select the correctEncoding
. ClickUpdate
.

- Back to
Instance Configuration
step, clickAdd a new row to 'Certificates'
underCertificates
.

- Enter
Key ID
and chooseCertificate
from the previous stage. Then clickUpdate
.

- Back in
Instance Configuration
step, navigate toJWS ALGORITHM
and select the appropriate algorithm. Proceed toACTIVE SYMMETRIC KEY ID
andACTIVE SIGNING CERTIFICATE KEY ID
, then select the key and certificate that were set up in steps 4 and 5 of this stage. ClickNext
when finished.

- In
Session Validation
step, check all options and clickNext
.

- In
Access Token Attribute Contract
step, navigate toExtend the Contract
and add the same claims that have already been set up in the stages:Policy Contract Grant Mapping
,IdP Adapter Grant Mapping
, andResource Owner Credentials Grant Mapping
. ClickNext
.

- Click
Next
inResource URI
s andAccess Control
steps. - Review all selected options in
Summary
tab, then clickSave
to complete.
Set up Access Token Mappings
- In homepage, navigate to
APPLICATIONS
and click onAccess Token Mappings
.

- In
Access Token Mappings
page, select the Authentication Policy Contract from the previous step to map toACCESS TOKEN MANAGER
. ClickAdd Mapping
.

- Click
Next
inAttribute Sources & User Lookup
step. - In
Contract Fulfillment
step, select the appropriateSource
andValue
, then clickNext
.

- Click
Next
inIssuance Criteria
step. - Review all selected options in
Summary
tab, then clickSave
. - Return to
Access Token Mappings
page and repeat the steps 2 to 6 for Validator and IdP Adapter.

Set up Scope Management
- In homepage, navigate to
SYSTEM
and clickOAuth Scopes
.

- Under
Scope Management
, atCommon Scopes
tab, fill inScope Value
,Scope Description
and then clickAdd
.

- Due to MetaDefender Core requires profile scope, repeat step 2 to add the scope.

- Click
Save
to complete.
Setup Authorization Server Settings
- In homepage, navigate to
SYSTEM
and clickAuthorization Server Settings
.

- Navigate to
OAuth Administrative Web Services Settings
and select the password credential validator that was set up in previous stage forPASSWORD CREDENTIAL VALIDATOR
. - Navigate to
Persistent Grant Management API
. - Select the access token manager and scope that were set up in the previous stage for
ACCESS TOKEN MANAGER
andREQUIRED SCOPE
, respectively.

- Click
Save
to complete.
Set up OpenID Connect Policy Management
- In homepage, navigate to
APPLICATIONS
and clickOpenID Connect Policy Management
.

- Click
Add Policy
in the next page. - In
Manage Policy
step, enterPOLICY ID
,NAME
and select the manager that was set up in previous stage forACCESS TOKEN MANAGER
. ClickNext
on done.
Store the value assigned to POLICY ID
as policy_id. It will be used later on fetching metadata in MetaDefender Core.

- In
Attribute Contract
step, navigate toExtend the Contract
, add the scopes requested by MetaDefender Core, and clickNext
.

- In
Attribute Scopes
step, match the scope with its attributes and clickNext
.

- Click
Next
inAttribute Sources & User Lookup
step. - In
Contract Fulfillment
step, select the appropriateSource
andValue
, and clickNext
.

- Click
Next
inIssuance Criteria
step. - Review all selected options in
Summary
tab, then clickSave
.
Add OAuth client
- In homepage, navigate to
APPLICATIONS
and clickOAuth Clients
.

- Click
Add Client
in the next page. - Enter
CLIENT ID
and store to client_id. - Enter
NAME
. - Choose
CLIENT SECRET
forCLIENT AUTHENTICATION
. - Navigate to
CLIENT SECRET
, checkCHANGE SECRET
box, clickGenerate Secret
, and store the generated string as client_secret.
client_id and client_secret will be used later on setting up MetaDefender Core.

- Navigate to
REDIRECT URIS
, fill in a temporary Redirection URI, and clickAdd
.
A temporary redirection URI is used at this step to complete configuration in PingFederate. We will return to update this setting with the correct URI from MetaDefender Core later.
- Navigate to
ALLOWED GRANT TYPES
, and tickAuthorization Code
. - Navigate to
DEFAULT ACCESS TOKEN MANAGER
, and select Access Token Manager that was set up previously.

- Navigate to
OPENID CONNECT
, underPolicy
, select OpenID connect policy that was set up previously.

- Click
Save
to complete.
Configure OIDC in MetaDefender Core
- Sign in to MetaDefender Core.
- In the dashboard, click on
User Management
in the left sidebar. - On
User Management
page, selectDirectories
tab and clickAdd Directory
in the top right corner.

- In
Add Directory
page, select OIDC asDirectory type
, and enter a name for the new directory, such as MDCore-OIDC. - Click
Fetch URL
.

- Enter PingFederate metadata URL and click
OK
.

PingFederate metadata URL is in format of <host>:<port>/.well-known/openid-configuration?policy_id=<policy_id>
, in which:
host
andport
are the host/IP and port of the machine hosting PingFederate. The default port is 9031.policy_id
is policy_id that is set toPOLICY_ID
in the stage of Setup OpenID Connect Policy Management.
- Under
Service Provider
, paste client_id and client_secret to boxes underClient ID
andClient secret
respectively. - Fill in
Host or IP
with the host or IP where MetaDefender Core is hosted, such as http://127.0.0.1:8008 for this example.

- Copy
Login URL
and store it as login_url.
login_url is used to update Redirection URI setting in PingFederate in the next stage.
- Fill in
User Identified by
with ${username}. - Select the default role and choose the appropriate role for the login user.
- Click
Add
to complete. - In
User Management
page, toggle the new directory, MDCORE-OIDC in this example. A dialog box will appear to confirm the action. OnceEnable
is clicked, all sessions will expire immediately.

Complete configuration in PingFederate
- Back to PingFederate, in
OAuth
, navigate toClients
in the sidebar. - In
APPLICATIONS
tab, navigate toRedirection URIs
, clickEdit
, modify the URI with login_url copied from MetaDefender Core. - Click
Update
andSave
.

Test the integration
- On the home screen of MetaDefender Core, click
Login
; the user is redirected to PingFederate Sign-on page.

- Sign in using the account registered with PingFederate.
- If everything goes well, MetaDefender Core dashboard is displayed with the user identity in the top right corner.

- Otherwise, access backup login page at
<mdcore-host>#/public/backuplogin
for trouble shooting.