Configuring an Azure Instance
Use the following settings when configuring PayNearMe on your Azure instance, which will use these settings to generate the SAML certificate for your site.
Sandbox vs. Production
The settings below are for the sandbox environment. You will need to generate a new certificate for the production environment.
Basic SAML Configuration
URL | Description |
---|---|
Identifier (Entity ID) | https://pro.paynearme-sandbox.com/users/saml/metadata |
Reply URL (Assertion Consumer Service URL) | https://pro.paynearme-sandbox.com/users/saml/auth |
Sign On URL | Optional |
Relay State | Optional |
Logout URL | Optional |
Attributes and Claims
Attribute | Description |
---|---|
givenname | user.givenname |
surname | user.surname |
emailaddress | user.mail |
name | user.userprincipalname |
user_type | “bpo” |
Unique User Identifier | user.userprincipalname |
Setting Up Enterprise Applications
Define two Entra ID enterprise applications, one each for sandbox and production environments. The following are instructions for setting up the sandbox enterprise application. Repeat these instructions for production.
-
Click New application. In the Entra ID Enterprise applications > All applications blade.
-
Click on Create your own application in the new page.
-
Enter
PayNearMe Sandbox
as the name of the new app, and select Integrate any other application you don’t find in the gallery (Non-gallery). -
Open the Manage > Single sign-on blade for the newly created application.
-
Click edit in the Basic SAML Configuration box.
-
Add the provided instance id value in the Identifier (Entity ID).
-
Add
https://pro.paynearme-sandbox.com/users/saml/auth
as the Reply URL (Assertion Consumer Service URL). -
Click Save.
Configuring the SAML Claims Using Entra ID Security Groups
The user_type
claim controls the application role assumed by the user in PayNearMe. The following instructions assume two application roles, agent
and merchant
, and one PayNearMe site, PayNearMe Sandbox
.
-
Define one Entra ID security group for each application role. Choose a prefix that identifies the site, and append the application role to it. For example,
PayNearMe-Sandbox-
, with the security groups beingPayNearMe-Sandbox-agent
andPayNearMe-Sandbox-merchant
.-
Open the Entra ID Groups > All groups blade in the Azure Portal:
-
Click
New group
. -
Fill in the details below:
-
Click
Create
. -
Repeat for all application roles.
-
-
Assign the security groups to the corresponding enterprise application.
-
Locate the enterprise application in the Enterprise applications blade:
-
Click on the enterprise application name.
-
Select the
Manage
>User and groups
section. -
Click
Add user/group
and add all security groups created in step 1. -
The final result should be:
-
-
Define the SAML claims.
-
Locate the enterprise application in the Enterprise applications blade:
-
Click on the enterprise application name.
-
Select
Single sign-on
: -
Click
Edit
underAttributes & Claims
section. -
Delete all additional claims by clicking the
...
menu next to each default claim, selectingDelete
and confirming. -
Add the following claims:
Name Source Value urn:mace:dir:attribute-def:email
Attribute
user.mail
first_name
Attribute
user.givenname
last_name
Attribute
user.surname
site
Attribute
"<provided site value>"
-
Click
Add a group claim
and enter the following (values listed in the text below
screenshot):Field Value Which groups associated with the user should be returned in the claim Groups assigned to the application
Source attribute Cloud-only group display names
Filter groups Checked Attribute to match Display name
Match with Prefix
String PayNearMe-Sandbox
Customize the name of the group claim Checked Name user_type
Namespace Leave empty Emit groups as role claim Unchecked Apply regex replace to groups claim content Checked Regex pattern ^PayNearMe-Sandbox-(?'role'.*)$
Regex replacement pattern {role}
Expose claim in JWT tokens in addition to SAML tokens Unchecked -
Click
Save
. -
The
Attributes & Claims
should be: -
Add users to the security groups as appropriate. Users will now be redirected and logged in to the PayNearMe site when accessing the enterprise application.
-
Users and Security Groups
A user should only be added to a single security group for each site. For example, if you have configured two sites,
PayNearMe Sandbox
andPayNearMe Production
, a user can belong toPayNearMe-Sandbox-agent
andPayNearMe-Production-merchant
, but not toPayNearMe-Sandbox-agent
andPayNearMe-Sandbox-merchant
. In the latter scenario the resultinguser_type
claim forPayNearMe Sandbox
will be malformed and the user won't be able to access the
PayNearMe site.
Generating Connection Values
After generating and sending PayNearMe the SAML certificate for your site, we’ll use the certificate to generate the certificate fingerprints and login URL for your configuration.
Parameter | Description | Example |
---|---|---|
Azure AD Identifier | The Azure Active Directory identifier. | https://sts.windows.net/17c47e7e-2b45-48b1-a5ba-5df2bb60cce5/ |
SP Entity ID | The SP Entity ID is a URL where a service provider publishes public information about its SAML configuration. The metadata document published by the service provider shows its public certificate that can be used to verify the signature of authentication requests initiated from the service itself. This ID typically includes the business name, environment, and type of SSO configuration. | BusinessName-Environment-ssoType toysrus-production-okta |
Certificate Fingerprint | The Identity provider (Idp) certificate fingerprint is exchanged out-of-band between the sender and the receiver and is configured on the receiving end. It uniquely identifies a certificate with the public key that the sender uses to sign the SAML messages that it sends. In most cases a client will supply PayNearMe with a X509 certificate within a metadata file which then needs to be converted into a thumbprint. For example, <x509 Certificate>MIIC8DCCAdigAwIBA….r61ShvRg\</x509 Certificate> To convert the X509 certificate to a thumbprint, complete the following steps:
| 4D:86:FC:B4:EB:F3:A4:99:CB:72:EC:0B:13:E6:C6: 23:F2:2C:EB:9B:10:02:4A:B7:C3:62:29:B4:89:47: 3C:58 |
IdP Cert Fingerprint Algorithm | Use the SignatureMethod property to specify the algorithm to use for signature generation and verification. This property identifies all cryptographic functions involved in creating an XML digital signature, including hashing, public key algorithms, Message Authentication Codes (MACs), and padding. | http://www.w3.org/2001/04/xmldsig-more#rsa-sha1 or http://www.w3.org/2000/09/xmldsig#rsa-sha1* |
Login URL | The identity provider portal URL where users will sign-on. | https://login.microsoft.com/17c47e7e-2b45-48b1-a5ba-5df2bb60cce5/saml2 |
*This algorithm has been deprecated and may not work.
Updated 9 months ago