SSH Key or Password Authentication For An SFTP User Using SEAS XAPI Custom Exit
SSH Key or Password Authentication For An SFTP User Using SEAS XAPI Custom Exit
com)
SSH key or password authentication for an SFTP user using SEAS XAPI
Custom Exit
Abstract
SSH key or password authentication for an SFTP user using SEAS XAPI Custom Exit
Body
The following information will provide all the steps necessary for configuring
an SFTP connection through SSP that will utilize the SEAS XAPI custom exit
to authenticate SSH key or password back to B2Bi.
Before you start (What’s Needed):
Client’s SSH Public Key
SSP’s SSH private key (sspEng1_ssh_privatekey)
B2BI’s Host public key (B2BiNode1_ssh_publicKey)
Admin access to B2Bi Dashboard GUI
Admin access to SEAS Dashboard GUI
Admin access to SSP Dashboard GUI
Configuring B2Bi
·Configure SEAS SSO Plugin on B2Bi
The following links will guide you through configuring the SEAS SSO plugin on B2Bi.
https://www.ibm.com/docs/en/secure-proxy/6.0.3?topic=cspbss-prepare-sterling-
file-gateway-support-single-sign-unix-linux
https://www.ibm.com/docs/en/secure-proxy/6.0.3?topic=cspbss-modify-sterling-
file-gateway-support-single-sign-unix-linux
https://www.ibm.com/docs/en/secure-proxy/6.0.3?topic=cspbss-prepare-sterling-
file-gateway-support-single-sign-microsoft-windows
https://www.ibm.com/docs/en/secure-proxy/6.0.3?topic=cspbss-modify-sterling-
file-gateway-support-single-sign-microsoft-windows
·Importing Client’s public key on B2Bi
Log in as the admin user to the B2Bi GUI
From the Administration Menu select Trading Partner > SSH > Authorized User
Key
o Check in Authorized User Key – Client’s Public Key (client_id_rsa.pub)
·Verify Requirements for User Account on B2Bi
From the Administration Menu select Accounts > User Accounts
o Type in the Account Name to be used and click Go
o Click Edit
Authentication Type (Both)
Authentication Host (SEAS Authentication)
Select Client’s Public Key (client_id_rsa.pub) in the SSH Authorized
User Key screen
Note: Password in the User Account can be a dummy password if using keyauth only)
·Verify Requirements for SFTP Server Adapter on B2Bi
From the Administration Menu select Deployment > Services >
Configuration
o Type in the Service Name for the SFTP adapter to be used and
click Go
o Click Edit
Type Required Authentication (Password)
Configuring SEAS
·Configure User Key Authentication Profile on SEAS
Note: The key and password are identical with the exception of the name of the profile. Best
practice would be to use 2 separate profiles that can be used in the SSP SFTP policy.
Log in as the admin user to the SEAS GUI
From SEAS “Authentication Definition” screen, select the create “Plus sign” button
In the “LDAP Authentication” specify the Profile name (XAPI_keyAuthProfile)
Specify the Authentication type (Generic)
uncheck “User ID required”
uncheck “Password required”
Check “Authenticate using custom exits”
Click on the ellipsis “…”
Specify the “Class name”
(com.sterlingcommerce.component.authentication.impl.SIUserAuthExit)
Click on the “Properties” ellipsis “…” and add the following properties:
o http.auth.user=<B2Bi admin user>
o pre-authenticate=true
o http.auth.password=<B2Bi admin password>
o url=http://<B2BiBaseIP:Port>/dashboard/interop/InteropHttpServlet
Click OK
Click OK
Click Next until you get to the button to save the configuration
Click Save
·Configure User Password Authentication Profile on SEAS
From SEAS “Authentication Definition” screen, select the create ”Plus” button
In the “LDAP Authentication” specify the Profile name (XAPI_passAuthProfile)
Specify the Authentication type (Generic)
Deselect “User ID required”
Deselect “Password required”
Select “Authenticate using custom exits”
Click on the ellipsis “…”
Specify the “Class name”
(com.sterlingcommerce.component.authentication.impl.SIUserAuthExit)
Click on the “Properties” ellipsis “…”
o http.auth.user=<B2Bi admin user>
o pre-authenticate=true
o http.auth.password=<B2Bi admin password>
o url=http://<B2BiBaseIP:Port>/dashboard/interop/InteropHttpServlet
Click OK
Click OK
Click Next until you get to the button to save the configuration
Click Save
Configuring SSP
·Creating New External Authentication Server on SSP
Select Advanced > Actions > New External Authentication Server
o Type External Authentication Server Name (SEAS1)
o Type External Authentication Server Address (SEAS Hostname)
o Type External Authentication Serer Port (SEAS Port)
o Click Save
·Importing B2Bi Known Host Key on SSP
Select Credentials > SSH Key Stores > Known Host Key Stores >
KnownHostKeyStore
o Click New
o Type Known Host Key Name (B2BiNode1_ssh_publicKey)
o Select Browse (locate the B2BiNode1_ssh_publicKey file)
o Click OK
o Click Save
·Importing SSP Private Key on SSP
Select Credentials > SSH Key Stores > Local Host Key Stores >
LocalHostKeyStore
o Click New
o Type Local Host Key Name (sspEng1_ssh_privatekey)
o Input Password
o Select Browse (locate the sspEng1_ssh_privatekey file)
o Select Ok
o Select Save
·Creating new SFTP Policy on SSP
Select Configuration > Actions > New Policy > SFTP Policy
o Type the name (sftp_PwdOrKey_policy)
o Select the Advanced Tab
Required Authentication Method (Password or Key)
Select under the User Authentication Mechanism “Through External
Authentication “ to use External Authentication
External Authentication Profile specify the SEAS profile created in
this scenario (XAPI_passAuthProfile)
Key Authentication Profile specify the SEAS profile created in this
scenario (XAPI_keyAuthProfile)
Select User Mapping to SSO token from External Authentication
Click Save
https://www.ibm.com/docs/en/secure-proxy/6.0.3?topic=cspbss-prepare-sterling-
file-gateway-support-single-sign-microsoft-windows
Before you enable single sign-on between a trading partner and Sterling File Gateway, when
using Secure Proxy, you modify the Sterling File Gateway installation. The files required to
enable SSO are installed with Sterling External Authentication Server. To prepare Sterling
File Gateway to support SSO on Microsoft Windows:
1. From the Sterling External Authentication Server, copy the files from
the EA_install_dir\lib\sterling\sfg-sso-plugin directory to a location that is accessible
by the Sterling File Gateway server.
Note: If you use FTP to copy the files to the Sterling File Gateway server, be sure to
transfer the .jar files in binary mode (TYPE I).
# seas-sso=<SI_install>\properties\seas-sso\1.0\seas-sso.properties
# seas-auth=<SI_install>\properties\seas-auth\1.0\seas-auth.properties
Integrating Active Directory / LDAP with IBM Sterling B2B Integrator (B2Bi)
In this blog, we will be covering how enterprises are authenticating users of IBM Sterling
B2B Integrator (B2Bi)/Sterling File Gateway (SFG) using LDAP.
LDAP stands for Lightweight Directory Access Protocol. As the name suggests, it is a
lightweight client-server protocol for accessing directory services, specifically X.500-based
directory services. LDAP runs over TCP/IP or other connection-oriented transfer services.
The LDAP authentication is one of the most popular mechanisms around the world for
enterprise application authentication.
Before deep diving into LDAP authentication on Active Directory, it is important to
understand some basics about LDAP. Here are the some of the most commonly used terms
while working with LDAP:
Dn - Distinguished name, a unique name which is used to find the user in LDAP
server.
Ou - Organization Unit
Bind - LDAP Bind is an operation in which LDAP clients send a bind request to
LDAP users including username and password and if the LDAP server finds that the
user and password are correct, it allows the user to access the LDAP server.
Search - LDAP search is an operation which is performed to retrieve Dn of the user
by using user credentials.
Root - LDAP directory's top element (like the root of a tree)
BaseDn - a branch in LDAP tree which can be used as a base for LDAP search
operation like dc=IBM,dc=org
For this exercise, we have used Apache LDAP server.
Assuming that the user that we authenticate using LDAP is “ibmuser”, this needs to be
present in the LDAP. We have highlighted the corresponding LDAP entries (explained
above) in the image below which is the screenshot of our LDAP configuration.
One of the most common requirements that we come across while implementing B2Bi for our
clients is - to have the application user authenticated by their centralized LDAP or LDAP
over SSL (LDAPS). In order to implement LDAPS, we need to exchange the public
keys/certificates with the LDAP team.
In order to achieve this in B2Bi, we need to work closely with the LDAP team because not
every LDAP is configured in the same way. The LDAP tree structure differs from one
organization to another.
The Pre-requisite is that the B2Bi application should be able to connect with LDAP, in other
words, the ports (if any) should be open on firewall.
When any application connects to LDAP for user authentication, there can mainly be 2
modes/ mechanisms in which LDAP authenticates the user. Those 2 modes are Bind mode
and Comparison mode. In this blog, we are covering the Bind Mode.
where authentication_1 is your first LDAP server. To use multiple LDAP servers, copy the
lines for authentication_1 and modify them for the properties for authentication_2. Continue
for as many servers as you want to set up.
Restart the B2Bi for your changes in the customer_overrides.properties file to take effect over
the authentication_policy.properties file.
Go to “User Accounts” and change the authentication type for the user as “External” and
select the LDAP from the drop down menu as shown in the image below:
Here is the snippet of authentication.log which has information of the “ibmuser” successful
login:
This completes the LDAP integration with Sterling B2Bi . Select the same Ldap while
creating the user accounts. In the second part of the blog, we will discuss the integration
between Sterling External Authentication Server (SEAS) with B2Bi via LDAP.