OpenConext / Mujina

A mock IDP and SP using the OpenSAML library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SP redirect...

sisyphus18 opened this issue · comments

Thank you for this SAML mockup package. Very useful.

I could set it up and run, change the IDP listen to a different port, and make the SP (its an application we are using) login screen send a request to Mujina IDP. I get the login screen, but after entering the credentials (user/secret) its not redirecting back to the SP. Where can I specify a redirect URI?
I see a post on AssertionConsumerURL - is this connected to the issue I am facing?

There's no entry in the logs, but for your reference I am pasting both SP log and Mujina IDP log...

2018-08-29 17:41:33.517 INFO --- [nio-8080-exec-9] o.s.security.saml.log.SAMLDefaultLogger : AuthNRequest;SUCCESS;127.0.0.1;https://csichargingdev.atos-srv.net/csi-gu
i-chargedb/;http://mock-idp;;;
2018-08-29 17:56:09.132 INFO --- [io-8080-exec-10] o.s.security.saml.log.SAMLDefaultLogger : AuthNRequest;SUCCESS;127.0.0.1;https://csichargingdev.atos-srv.net/csi-gu
i-chargedb/;http://mock-idp;;;

17:41:12.894 11042 [main] INFO o.s.b.c.e.t.TomcatEmbeddedServletContainer - Tomcat started on port(s): 8090 (http)
17:41:12.910 11058 [main] INFO mujina.MujinaIdpApplication - Started MujinaIdpApplication in 10.465 seconds (JVM running for 33.807)
17:41:33.720 31868 [http-nio-8090-exec-1] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring FrameworkServlet 'dispatcherServlet'
17:41:33.720 31868 [http-nio-8090-exec-1] INFO o.s.web.servlet.DispatcherServlet - FrameworkServlet 'dispatcherServlet': initialization started
17:41:33.798 31946 [http-nio-8090-exec-1] INFO o.s.web.servlet.DispatcherServlet - FrameworkServlet 'dispatcherServlet': initialization completed in 62 ms
17:41:33.923 32071 [http-nio-8090-exec-2] INFO org.thymeleaf.TemplateEngine - [THYMELEAF] INITIALIZING TEMPLATE ENGINE
17:41:34.001 32149 [http-nio-8090-exec-2] INFO o.t.t.AbstractTemplateResolver - [THYMELEAF] INITIALIZING TEMPLATE RESOLVER: org.thymeleaf.spring4.templateresolver.Spri
ngResourceTemplateResolver
17:41:34.017 32165 [http-nio-8090-exec-2] INFO o.t.t.AbstractTemplateResolver - [THYMELEAF] TEMPLATE RESOLVER INITIALIZED OK
17:41:34.017 32165 [http-nio-8090-exec-2] INFO o.t.m.AbstractMessageResolver - [THYMELEAF] INITIALIZING MESSAGE RESOLVER: org.thymeleaf.spring4.messageresolver.SpringM
essageResolver
17:41:34.032 32180 [http-nio-8090-exec-2] INFO o.t.m.AbstractMessageResolver - [THYMELEAF] MESSAGE RESOLVER INITIALIZED OK
17:41:34.048 32196 [http-nio-8090-exec-2] INFO org.thymeleaf.TemplateEngine.CONFIG - [THYMELEAF] TEMPLATE ENGINE CONFIGURATION:
[THYMELEAF] * Cache Factory implementation: org.thymeleaf.cache.StandardCacheManager
[THYMELEAF] * Template modes:
[THYMELEAF] * XML
[THYMELEAF] * LEGACYHTML5
[THYMELEAF] * VALIDXML
[THYMELEAF] * HTML5
[THYMELEAF] * XHTML
[THYMELEAF] * VALIDXHTML
[THYMELEAF] * Template resolvers (in order):
[THYMELEAF] * org.thymeleaf.spring4.templateresolver.SpringResourceTemplateResolver
[THYMELEAF] * Message resolvers (in order):
[THYMELEAF] * org.thymeleaf.spring4.messageresolver.SpringMessageResolver
[THYMELEAF] * Dialect [1 of 2]: org.thymeleaf.spring4.dialect.SpringStandardDialect
[THYMELEAF] * Prefix: "th"
[THYMELEAF] * Dialect [2 of 2]: nz.net.ultraq.thymeleaf.LayoutDialect
[THYMELEAF] * Prefix: "layout"
[THYMELEAF] TEMPLATE ENGINE CONFIGURED OK
17:41:34.141 32289 [http-nio-8090-exec-2] INFO org.thymeleaf.TemplateEngine - [THYMELEAF] TEMPLATE ENGINE INITIALIZED

Thanking you in advance.

The AuthnRequest request send by mujina-sp contains an AssertionConsumerServiceURL which is the location used in the 302 redirect send by mujina-idp. The AssertionConsumerServiceURL is configured in the SpConfiguration used by the ConfigurableSAMLProcessor. The AssertionConsumerServiceURL is the concatenation of the properties sp.base_url and sp.acs_location_path in the application.yml configuration in the mujina-sp project.