此内容没有您所选择的语言版本。
Chapter 10. SAML-Based Security for OData
10.1. SAML-Based Security for OData 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
By default, the OData access to a Virtual Database (VDB) in Red Hat JBoss EAP uses the HTTP Basic authentication method.
However, you can also configure OData to utilize Single-Sign-On (SSO)-based security using SAML2. This is how you do so with PicketLink.
Prerequisites
- An identity provider configued and working with the security domain of your choice such as LDAP or Kerberos. (In this example it is an OData WAR file.)
- You must have the certificate for authentication that is used by IDP to sign the SAML messages.
- The PicketLink subsystem must be installed in your EAP instance.
- The DNS names for the machines on which Red Hat JBoss EAP is installed.
Note
Do not try to use IP address or localhost except for in testing scenarios. Configure proper DNS names for both the IDP and the security provider servers and make sure both can access each other using the URLs you have configured. - The SSO POST-based URL for your IDP, that your security provider can use to redirect for authentication call.
- Add an extension to the PicketLink subsystem:
<extensions> <extension module="org.picketlink.as.extension" /> <extensions>
<extensions> <extension module="org.picketlink.as.extension" /> <extensions>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure the PicketLink subsystem:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
Normally, the certificate alias is the domain name, such as "idp.jboss.org" - Configure the security domains to be used by the security provider:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Change the OData transport in the Teiid subsystem:
<transport name="odata"> <authentication security-domain="sp"/> </transport><transport name="odata"> <authentication security-domain="sp"/> </transport>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Move the
teiid-odata-xxxx.warfile fromdataVirtualization/vdb/teiid-odata-xxx.warto a temporary location. - Edit the
jboss-web.xmlfile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Edit the
web.xmlfile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add the certificate received from IDP vendor to the
WEB-INF/classesdirectory.Note
This must be same name as {CERTIFICATE-FILE-NAME} used in when you configured the PicketLink subsystem. - Recreate the WAR file based on the modified contents of the other files by running this command:
jar -cvf teiid-odata-xxxx.war /temp/* - Copy the newly-created WAR file into the
/modules/system/base/org/jboss/teiid/main/deploymentsdirectory. - Start the Data Virtualization server, and access the OData URL, You will be redirected to the SSO-based authentication.