italia / spid-keycloak-provider

Italian SPID authentication provider for Keycloak (https://www.keycloak.org/)
Apache License 2.0
62 stars 22 forks source link

Indicazioni sulla Wiki non esatte (Service Provider Entity ID e AuthnContextClassRef) #47

Closed frabnet closed 5 months ago

frabnet commented 1 year ago

Salve, volevo contribuire al miglioramento della Wiki, ma prima di farlo volevo chiedere se effettivamente esiste un errore oppure il mio è un caso particolare.

Alla pagina https://github.com/italia/spid-keycloak-provider/wiki/Defining-SPID-IdPs

E' riportato:

Service Provider Entity ID: set to the Entity ID you want to use to identify your Service Provider; TIP: While the Service Provider Entity ID has to be an URI, there is no need for it to be a real, working internet address. It is just an identifier for your organization Service Provider. Make sure to choose it wisely, as it can't be changed once it has been shared with the federation;

AuthnContext ClassRefs: enter - in order from the most preferred to the least preferred - one or more of the SPID Authentication Level classes. Valid values are:

https://www.spid.gov.it/SpidL3 https://www.spid.gov.it/SpidL2 https://www.spid.gov.it/SpidL1

In realtà, dopo aver sbattuto la testa per svariate ore sullo SPID Validator reso a disposizione (https://demo.spid.gov.it/), che restituiva un errore assurdo (Gateway Timeout), ho scoperto, soltanto eseguendo il Validator in locale (https://github.com/italia/spid-saml-check), che:

1) L'attributo entityID deve essere impostato esattamente come il realm di keycloak e non "a caso" come indicato 2) Solo un AuthnContextClassRef è permesso

{
  test_id: '',
  result: 'failure',
  test: "The Issuer's value MUST be equal to entityID",
  value: 'https://sso.aspbassaromagna.it/realms/bandi',
  references: [],
  method: ''
}
{
  test_id: '',
  result: 'failure',
  test: 'Only one AuthnContexClassRef element MUST be present',
  value: "['<AuthnContextClassRef>https://www.spid.gov.it/SpidL3</AuthnContextClassRef>', '<AuthnContextClassRef>https://www.spid.gov.it/SpidL2</AuthnContextClassRef>', '<AuthnContextClassRef>https://www.spid.gov.it/SpidL1</AuthnContextClassRef>']",
  references: [],
  method: ''
}
nicolabeghin commented 6 months ago

@frabnet una PR è ben accetta, grazie!

nicolabeghin commented 5 months ago

Wiki aggiornata, chiudo