/ / SAML Весняний тайм-аут сеансу безпеки - весняна безпека, saml, spring-saml

Тайм-аут сесії SAML Spring - безпека навесні, самл, весна-самл

Я налаштував SAML SSO, який працює нормально. Коли сеанс закінчується, він дає наступний в журналі.

2017-04-15 15:14:16,933 [http-nio-7070-exec-8] INFO  org.springframework.boot.actuate.audit.listener.AuditListener - AuditEvent [timestamp=Sat Apr 15 15:14:16 IST 2017, principal=anonymousUser, type=AUTHORIZATION_FAILURE, data={message=Access is denied, type=org.springframework.security.access.AccessDeniedException}]
2017-04-15 15:14:17,035 [http-nio-7070-exec-8] INFO  org.springframework.security.saml.log.SAMLDefaultLogger - AuthNRequest;SUCCESS;0:0:0:0:0:0:0:1;com.hbo.sso:portal;http://www.okta.com/xxxxxxx;;;

Ось моя spring-security.xml

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd">

<import resource="classpath*:applicationContext-saml.xml" />

<security:http  entry-point-ref="samlEntryPoint" use-expressions="true">
<security:intercept-url .... />
/* Logging out user */
<security:intercept-url pattern="/${myapp.logout.url}" access="permitAll()"/>
</security:http>

</beans>

Відповіді:

1 для відповіді № 1

Коли сеанс закінчився, ваша весняна сесіяочищається автоматично, тому він виключає виняток Access Denied, рішення може бути 1. у вашому spring-security.xml додати доступ до недозволених деталей перенаправлення сторінок .. напр.

<security:http > <security:access-denied-handler error-page="/anonymous/accessdeniedpage.jsp"/> </security:http> або 2. Якщо IDP дає змогу налаштувати сторінку перенаправлення на тайм-аут сеансу, тоді вкажіть її на сторінці входу.