Skip to content

Commit

Permalink
Update conditions tag
Browse files Browse the repository at this point in the history
Some of the service providers require "NotBefore" and "NotOnOrAfter" attributes in the <Conditions/> tag.

We were trying to configure `dustin-decker/saml-proxy` to work with `mujina-idp`, but came across security related exceptions
which we fixed locally by adding the formentioned attributes.
  • Loading branch information
bolatov authored Jun 7, 2019
1 parent 5724078 commit 87d95e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mujina-common/src/main/java/mujina/saml/SAMLBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ public static Assertion buildAssertion(SAMLPrincipal principal, Status status, S
audienceRestriction.getAudiences().add(audience);

Conditions conditions = buildSAMLObject(Conditions.class, Conditions.DEFAULT_ELEMENT_NAME);
conditions.setNotBefore(new DateTime().minusMinutes(3));
conditions.setNotOnOrAfter(new DateTime().plusMinutes(3));
conditions.getAudienceRestrictions().add(audienceRestriction);
assertion.setConditions(conditions);

Expand Down

0 comments on commit 87d95e0

Please sign in to comment.