[midPoint] Flexible Authentication SAML2 - Azure Active Directory
Sanudo Martinez, Santiago
Santiago.SanudoMartinez at ingrammicro.com
Thu Jul 22 14:01:10 CEST 2021
Hi,
We are encountering a problem where we aren't able to establish login using SAML authentication via Azure AD. We have a midpoint instance running in a VM with a Nginx proxy which currently redirects everything from http to https:
# If the user access through the 80 port (default HTTP port), NGINX will redirect him to the 443 (HTTPS)
server {
listen 80;
listen [::]:80;
return 301 https://10.19.5.4;
}
# If the user access through the 443 port, NGINX will redirect him to https://localhost:8080 where Kibana is running
server {
listen 443 default_server;
listen [::]:443;
ssl on;
ssl_certificate /etc/pki/tls/certs/midpoint.pem;
ssl_certificate_key /etc/pki/tls/private/midpoint.key;
access_log /var/log/nginx/nginx.access.log;
error_log /var/log/nginx/nginx.error.log;
location / {
proxy_pass http://localhost:8080/;
}
}
The Midpoint application is deployed at localhost as described in application.yml:
spring:
application:
name: MidPoint
main:
# needed to override springSecurityFilterChain from Spring Security
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
file-size-threshold: 256KB
thymeleaf:
cache: false
server:
address: localhost
port: 8080
tomcat:
basedir: ${midpoint.home}
max-http-post-size: 104857600 # in bytes
With this, all the communication done to the Midpoint environment is done with port 443(HTTPS). We have created an app Enterpise at Azure Active Directory and we are configuring the SAML in order to login. To do so we have also establish the following securityPolicy:
<securityPolicy xmlns=http://midpoint.evolveum.com/xml/ns/public/common/common-3 xmlns:c=http://midpoint.evolveum.com/xml/ns/public/common/common-3 xmlns:icfs=http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3 xmlns:org=http://midpoint.evolveum.com/xml/ns/public/common/org-3 xmlns:q=http://prism.evolveum.com/xml/ns/public/query-3 xmlns:ri=http://midpoint.evolveum.com/xml/ns/public/resource/instance-3 xmlns:t=http://prism.evolveum.com/xml/ns/public/types-3 oid="00000000-0000-0000-0000-000000000120" version="18">
<name>Default Security Policy</name>
<metadata>
<requestTimestamp>2020-12-01T12:00:15.108Z</requestTimestamp>
<createTimestamp>2020-12-01T12:00:15.137Z</createTimestamp>
<createChannel>http://midpoint.evolveum.com/xml/ns/public/common/channels-3#init</createChannel>
</metadata>
<operationExecution id="1">
<timestamp>2020-12-01T12:00:15.179Z</timestamp>
<operation>
<objectDelta>
<t:changeType>add</t:changeType>
<t:objectType>c:SecurityPolicyType</t:objectType>
</objectDelta>
<executionResult>
<operation>com.evolveum.midpoint.model.impl.lens.ChangeExecutor.executeDelta</operation>
<status>success</status>
<importance>normal</importance>
<token>1000000000000000015</token>
</executionResult>
<objectName>Default Security Policy</objectName>
</operation>
<status>success</status>
<channel>http://midpoint.evolveum.com/xml/ns/public/common/channels-3#init</channel>
</operationExecution>
<iteration>0</iteration>
<iterationToken/>
<authentication>
<modules>
<loginForm >
<name>internalLoginForm</name>
<description>Internal username/password authentication, default user password, login form</description>
</loginForm>
<httpBasic >
<name>internalBasic</name>
<description>Internal username/password authentication, using HTTP basic auth</description>
</httpBasic>
<saml2 >
<name>azureSsoSaml</name>
<description>My internal enterprise SAML-based SSO system.</description>
<network>
<readTimeout>10000</readTimeout>
<connectTimeout>5000</connectTimeout>
</network>
<serviceProvider>
<entityId>sp_midpoint</entityId>
<aliasForPath>sp_midpoint</aliasForPath>
<provider>
<entityId>https://sts.windows.net/484fa682-02f6-4ffa-8cea-f72692457936/</entityId<https://sts.windows.net/484fa682-02f6-4ffa-8cea-f72692457936/%3c/entityId>>
<linkText>ssoazure</linkText>
<alias>ssoazure</alias>
<metadata>
<metadataUrl>https://login.microsoftonline.com/484fa682-02f6-4ffa-8cea-f72692457936/federationmetadata/2007-06/federationmetadata.xml?appid=c1bacfd5-5041-4b02-aac3-fa76e0a3560e</metadataUrl<https://login.microsoftonline.com/484fa682-02f6-4ffa-8cea-f72692457936/federationmetadata/2007-06/federationmetadata.xml?appid=c1bacfd5-5041-4b02-aac3-fa76e0a3560e%3c/metadataUrl>>
</metadata>
<skipSslValidation>true</skipSslValidation>
<authenticationRequestBinding>urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST</authenticationRequestBinding>
<nameOfUsernameAttribute>uid</nameOfUsernameAttribute>
</provider>
</serviceProvider>
</saml2>
</modules>
<sequence id="8">
<name>admin-gui-default</name>
<description>
Default GUI authentication sequence.
We want to try company SSO, federation and internal. In that order.
Just one of then need to be successful to let user in.
</description>
<channel>
<channelId>http://midpoint.evolveum.com/xml/ns/public/common/channels-3#user</channelId>
<default>true</default>
<urlSuffix>default</urlSuffix>
</channel>
<module>
<name>azureSsoSaml</name>
<order>30</order>
<necessity>sufficient</necessity>
</module>
</sequence>
<sequence id="9">
<name>admin-gui-emergency</name>
<description>
Special GUI authentication sequence that is using just the internal user password.
It is used only in emergency. It allows to skip SAML authentication cycles, e.g. in case
that the SAML authentication is redirecting the browser incorrectly.
</description>
<channel>
<channelId>http://midpoint.evolveum.com/xml/ns/public/common/channels-3#user</channelId>
<default>false</default>
<urlSuffix>emergency</urlSuffix>
</channel>
<requireAssignmentTarget oid="00000000-0000-0000-0000-000000000004" relation="org:default" type="c:RoleType"/>
<module id="14">
<name>internalLoginForm</name>
<order>30</order>
<necessity>sufficient</necessity>
</module>
</sequence>
<sequence id="16">
<name>rest</name>
<description>
Authentication sequence for REST service.
</description>
<channel>
<channelId>http://midpoint.evolveum.com/xml/ns/public/common/channels-3#rest</channelId>
<default>true</default>
<urlSuffix>rest-default</urlSuffix>
</channel>
<module id="18">
<name>internalBasic</name>
<order>10</order>
<necessity>sufficient</necessity>
</module>
</sequence>
<sequence id="17">
<name>actuator</name>
<description>
Authentication sequence for actuator.
</description>
<channel>
<channelId>http://midpoint.evolveum.com/xml/ns/public/common/channels-3#actuator</channelId>
<default>true</default>
<urlSuffix>actuator-default</urlSuffix>
</channel>
<module id="19">
<name>internalBasic</name>
<order>10</order>
<necessity>sufficient</necessity>
</module>
</sequence>
<ignoredLocalPath>/actuator</ignoredLocalPath>
<ignoredLocalPath>/actuator/health</ignoredLocalPath>
</authentication>
<credentials>
<password>
<minOccurs>0</minOccurs>
<lockoutMaxFailedAttempts>3</lockoutMaxFailedAttempts>
<lockoutFailedAttemptsDuration>PT3M</lockoutFailedAttemptsDuration>
<lockoutDuration>PT15M</lockoutDuration>
<valuePolicyRef xmlns:tns=http://midpoint.evolveum.com/xml/ns/public/common/common-3 oid="00000000-0000-0000-0000-000000000003" relation="org:default" type="tns:ValuePolicyType"/>
</password>
</credentials>
</securityPolicy>
Regarding the Azure enterprise application saml config:
[cid:image003.png at 01D77F02.04F70A40]
Being the midpoint resource IP: 10.19.5.4.
After I start I get the following error display:
[cid:image004.png at 01D77F02.04F70A40]
And if I select the identity provider it redirects me to:
[cid:image005.png at 01D77F02.04F70A40]
Any ideas?
Regards,
Santiago Sañudo Martínez
La información contenida en este mensaje es confidencial. En caso de que reciba este mensaje por error le rogamos lo comunique a la mayor brevedad al emisor y proceda a su eliminación definitiva, absteniéndose de copiar, almacenar o difundir su contenido. De acuerdo con lo establecido en la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal y en el Reglamento de Desarrollo 1720/2007, los datos personales que facilite a través de la dirección de correo indicada serán incorporados a un fichero titularidad de INGRAM MICRO, S.L.U., con domicilio en C/ Antonio Machado, 78-80 1ª y 2ª pl. Business Park ( 08840-Viladecans). Mediante el envío de sus datos, Ud. otorga su consentimiento expreso a INGRAM MICRO, S.L.U, para el tratamiento de sus datos, con la finalidad de atender a su consulta y/o mantener la relación profesional, comercial, y/o contractual que en su caso establezca con INGRAM MICRO, S.L.U. Puede ejercitar sus derechos de acceso, rectificación, cancelación y oposición notificándolo por escrito a la dirección del remitente, o a la siguiente dirección de correo nuevascuentas at ingrammicro.es. De acuerdo con la Ley 34/2002, de Servicios de la Sociedad de la Información y de Comercio Electrónico, Vd. podrá oponerse en cualquier momento al tratamiento de sus datos con fines promocionales notificándonoslo por escrito a la dirección de correo mencionada.
.................................................................................................................................................................................................................................................
The information contained in this message is confidential. If you receive this message by error please notify it as soon as possible to the sender and proceed to their final elimination by not copy, store or distribute its content. In accordance of what is stated in the Law 15/1999, of Data Personal Protection and Regulation Rule 1720/2007, the personal data provided through the email address you entered will be included in a file owned by INGRAM MICRO, SLU, located at C/ Antonio Machado, 78-80 1ª y 2ª pl. Business Park ( 08840-Viladecans). By submitting your data, you expressly give your consent to INGRAM MICRO, SLU, to the treatment of your data, in order to answer to your questions and / or keep the professional, commercial relationship and / or contractual set with INGRAM MICRO, SLU You can exercise your rights of access, rectification, cancellation and opposition by giving written notification to the sender address or to the following email: nuevascuentas at ingrammicro.es. According to Law 34/2002, of the Information Society and Electronic Commerce, you may object at any time to your data treatment for promotional purposes by notifying us in writing to the email address above.
[Ingram_2818e5de]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20210722/d1e708eb/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 23721 bytes
Desc: image003.png
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20210722/d1e708eb/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 26443 bytes
Desc: image004.png
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20210722/d1e708eb/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 7651 bytes
Desc: image005.png
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20210722/d1e708eb/attachment-0005.png>
More information about the midPoint
mailing list