OpenConext / Mujina

A mock IDP and SP using the OpenSAML library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incompatible ID

markmishaev opened this issue · comments

When validating SAML response with OneLogin SAML tools, the validation fails because of incorrect IDs format (response and assertion).

https://www.samltool.com/validate_response.php

Agreed - may not start with digit. Fix is to always prefix with e.g. MU or _.

@oharsta

There is better solution:
private final IdentifierGenerator idGenerator;
this.idGenerator = new SecureRandomIdentifierGenerator();
private String idUnique() {
return idGenerator.generateIdentifier();
}
Btw, the same should be done with AssertionID:
Assertion assertion = buildAssertion(principal, status, entityId);
assertion.setID(idUnique());

Guys, please take a look.

I see, thanks!