Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes pre release 0.8.0 #105

Merged
merged 7 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 44 additions & 44 deletions README-Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,50 +70,50 @@ https://github.com/italia/Satosa-Saml2Spid/blob/oidcop/example/proxy_conf.yaml#L

You can override the configuration of the proxy by settings one or more of the following environment variables:

| Environment var | description | default |
|:---|:---|:---|
|**$SATOSA_BASE**|base url of satosa server|"https://$HOSTNAME"|
|**$SATOSA_ENCRYPTION_KEY**|encription key for state|"CHANGE_ME!"|
|**$SATOSA_SALT**|encription salt|"CHANGE_ME!"|
|**$SATOSA_DISCO_SRV**|Descovery page URL for all backends|"https://$HOSTNAME/static/disco.html"|
|**$SATOSA_PRIVATE_KEY**|private key for SAML2 / SPID backends||
|**$SATOSA_PUBLIC_KEY**|public key for SAML2 / SPID backends||
|**$MONGODB_USERNAME**|MongoDB username for oidc_op frontend, default from .env file in Docker-compose||
|**$MONGODB_PASSWORD**|MongoDB password for oidc_op frontend, default from .env file in Docker-compose||
|**$SATOSA_UNKNOW_ERROR_REDIRECT_PAGE**|redirect page for unknow erros|"https://$HOSTNAME/static/error_page.html"|
|**$SATOSA_ORGANIZATION_DISPLAY_NAME_EN**|Metadata English organization display name||
|**$SATOSA_ORGANIZATION_NAME_EN**|Metadata English full organization name||
|**$SATOSA_ORGANIZATION_URL_EN**|Metadata English organization url||
|**$SATOSA_ORGANIZATION_DISPLAY_NAME_IT**|Metadata Italian Organization display name||
|**$SATOSA_ORGANIZATION_NAME_IT**|Metadata Italian full organization||
|**$SATOSA_ORGANIZATION_URL_IT**|Metadata Italian organization url||
|**$SATOSA_CONTACT_PERSON_GIVEN_NAME**|Metadata Contact person name||
|**$SATOSA_CONTACT_PERSON_EMAIL_ADDRESS**|Metadata Contact person email||
|**$SATOSA_CONTACT_PERSON_TELEPHONE_NUMBER**|Metadata Contact person telephone number for SPID / CIE Backend||
|**$SATOSA_CONTACT_PERSON_FISCALCODE**|Metadata Contact person fiscal code for SPID / CIE Backend||
|**$SATOSA_CONTACT_PERSON_IPA_CODE**|Metadata Contact person ipa code for SPID / CIE Backend||
|**$SATOSA_CONTACT_PERSON_MUNICIPALITY**|Metadata Contact person municipality code for CIE Backend||
|**$SATOSA_UI_DISPLAY_NAME_EN**|Metadata English ui display name||
|**$SATOSA_UI_DISPLAY_NAME_IT**|Metadata Italian ui display name||
|**$SATOSA_UI_DESCRIPTION_EN**|Metadata English ui description||
|**$SATOSA_UI_DESCRIPTION_IT**|Metadata Italian ui description||
|**$SATOSA_UI_INFORMATION_URL_EN**|Metadata English ui information URL||
|**$SATOSA_UI_INFORMATION_URL_IT**|Metadata Italian ui information URL||
|**$SATOSA_UI_PRIVACY_URL_EN**|Metadata English ui privacy URL||
|**$SATOSA_UI_PRIVACY_URL_IT**|Metadata Italian ui privacy URL||
|**$SATOSA_UI_LOGO_URL**|Metadata Logo url for||
|**$SATOSA_UI_LOGO_WIDTH**|Metadata Logo width||
|**$SATOSA_UI_LOGO_HEIGHT**|Metadata logo height||
|**$SATOSA_SAML2_REQUESTED_ATTRIBUTES**|SAML2 required attributes|name, surname|
|**$SATOSA_SPID_REQUESTED_ATTRIBUTES**|SPID required attributes|spidCode, name, familyName, fiscalNumber, email|

### EUDI Wallet

**Satosa-Saml2Spid** uses the EUDI Wallet backend based on [eudi-wallet-it-python](https://github.com/italia/eudi-wallet-it-python) also known as pyeudiw.

**Pyeudiw** is based on OpenID4VP and specifically implements an EUDI Wallet Relying Party to provide a Wallet Authentication mechanims within SATOSA.

For more information about **EUDI Wallet** please visit the "Italian implementation profile" [page](https://italia.github.io/eudi-wallet-it-docs/versione-corrente/en/).
| **Environment var** | **Description** | **Example Value** |
|--------------------------------------------------|-----------------------------------------------------------|------------------------------------------------------------|
| **BASE_DIR** | Base directory for satosa proxy | /satosa_proxy |
| **SATOSA_BY_DOCKER** | Satosa configuration when run by Docker | 1 |
| **SATOSA_BASE** | Base URL of Satosa server | https://$HOSTNAME |
| **SATOSA_BASE_STATIC** | Base URL of Satosa server static folder | https://$HOSTNAME/static |
| **SATOSA_DISCO_SRV** | Discovery page URL for all backends | https://$HOSTNAME/static/disco.html |
| **SATOSA_UNKNOW_ERROR_REDIRECT_PAGE** | Redirect page for unknown errors | https://$HOSTNAME/static/error_page.html |
| **MONGODB_PASSWORD** | MongoDB password for oidc_op frontend | ${MONGO_DBPASSWORD} |
| **MONGODB_USERNAME** | MongoDB username for oidc_op frontend | ${MONGO_DBUSER} |
| **SATOSA_CONTACT_PERSON_EMAIL_ADDRESS** | Metadata Contact person email | support.example@organization.org |
| **SATOSA_CONTACT_PERSON_TELEPHONE_NUMBER** | Metadata Contact person telephone number for SPID / CIE Backend | +3906123456789 |
| **SATOSA_CONTACT_PERSON_FISCALCODE** | Metadata Contact person fiscal code for SPID / CIE Backend | 01234567890 |
| **SATOSA_CONTACT_PERSON_GIVEN_NAME** | Metadata Contact person name | Name |
| **SATOSA_CONTACT_PERSON_IPA_CODE** | Metadata Contact person IPA code for SPID / CIE Backend | ispra_rm |
| **SATOSA_CONTACT_PERSON_MUNICIPALITY** | Metadata Contact person municipality code for CIE Backend | H501 |
| **SATOSA_ENCRYPTION_KEY** | Encryption key for state | CHANGE_ME! |
| **SATOSA_ORGANIZATION_DISPLAY_NAME_EN** | Metadata English organization display name | Resource provided by Example Organization |
| **SATOSA_ORGANIZATION_DISPLAY_NAME_IT** | Metadata Italian organization display name | Resource provided by Example Organization |
| **SATOSA_ORGANIZATION_NAME_EN** | Metadata English full organization name | Resource provided by Example Organization |
| **SATOSA_ORGANIZATION_NAME_IT** | Metadata Italian full organization name | Resource provided by Example Organization |
| **SATOSA_ORGANIZATION_URL_EN** | Metadata English organization URL | https://example_organization.org |
| **SATOSA_ORGANIZATION_URL_IT** | Metadata Italian organization URL | https://example_organization.org |
| **SATOSA_PRIVATE_KEY** | Private key for SAML2 / SPID backends | ${KEYS_FOLDER}/privkey.pem |
| **SATOSA_PUBLIC_KEY** | Public key for SAML2 / SPID backends | ${KEYS_FOLDER}/cert.pem |
| **SATOSA_SALT** | Encryption salt | CHANGE_ME! |
| **SATOSA_STATE_ENCRYPTION_KEY** | State encryption key | CHANGE_ME! |
| **SATOSA_UI_DESCRIPTION_EN** | Metadata English UI description | Resource description |
| **SATOSA_UI_DESCRIPTION_IT** | Metadata Italian UI description | Resource description |
| **SATOSA_UI_DISPLAY_NAME_EN** | Metadata English UI display name | Resource Display Name |
| **SATOSA_UI_DISPLAY_NAME_IT** | Metadata Italian UI display name | Resource Display Name |
| **SATOSA_UI_INFORMATION_URL_EN** | Metadata English UI information URL | https://example_organization.org/information_url_en |
| **SATOSA_UI_INFORMATION_URL_IT** | Metadata Italian UI information URL | https://example_organization.org/information_url_en |
| **SATOSA_UI_LOGO_HEIGHT** | Metadata logo height | 60 |
| **SATOSA_UI_LOGO_URL** | Metadata Logo URL | https://example_organization.org/logo.png |
| **SATOSA_UI_LOGO_WIDTH** | Metadata Logo width | 80 |
| **SATOSA_UI_PRIVACY_URL_EN** | Metadata English UI privacy URL | https://example_organization.org/privacy_en |
| **SATOSA_UI_PRIVACY_URL_IT** | Metadata Italian UI privacy URL | https://example_organization.org/privacy_en |
| **SATOSA_USER_ID_HASH_SALT** | User ID hash salt | CHANGE_ME! |
| **SATOSA_REQUESTED_ATTRIBUTES** | Requested attributes | [] |
| **GET_IDEM_MDQ_KEY** | Flag for getting idem MDQ key | true |
| **SATOSA_SAML2_REQUESTED_ATTRIBUTES** | SAML2 required attributes | name, surname |
| **SATOSA_SPID_REQUESTED_ATTRIBUTES** | SPID required attributes | spidCode, name, familyName, fiscalNumber, email |



### Saml2 Metadata
Expand Down
9 changes: 4 additions & 5 deletions example/plugins/backends/pyeudiw_backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@ config:

endpoints:
pre_request: '/pre-request'
redirect: '/redirect-uri'
response: '/response-uri'
request: '/request-uri'
entity_configuration: '/.well-known/openid-federation'
status: '/status'
get_response: '/get-response'

qrcode:
size: 100
color: '#2B4375'
size: 250 # px
color: '#000000' # hex
expiration_time: 120 # seconds
logo_path:
use_zlib: false
logo_path: 'wallet-it/wallet-icon-blue.svg' # relative to static_storage_url

jwt:
default_sig_alg: ES256 # or RS256
Expand Down
7 changes: 7 additions & 0 deletions example/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -393,3 +393,10 @@
.qr-code-text{
font-size: 15px;
}

.icon-qr-code {
width: 130%;
vertical-align: middle;
margin-left: -15%;
margin-top: -10%;
}
40 changes: 17 additions & 23 deletions example/static/disco.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Accedi</title>
<meta name="description" content="Accedi">

<link rel="stylesheet" href="/static/css/style.css">

<!-- Bootstrap Italia CSS -->
<link href="css/bootstrap-italia.min.css" rel="stylesheet">
<!-- ita-buyyon CSS -->
<link href="css/ita.min.css" rel="stylesheet">
<link href="css/ita-font.min.css" rel="stylesheet">
</head>
</head>
<body>
<!-- Container - Body of page-->
<div class="main-body">
<div class="container">
<div class="col-12 py-md-5 bd-content">
<div class="text-center">
<h3 class="">Accedi per continuare sul servizio</h4>
<h1 class="">Accedi per continuare sul servizio</h1>
<p>Per accedere al servizio scegli uno dei seguenti metodi di autenticazione</p>
<!-- <p><b>**Le informazioni contenute in questa pagina di esempio non sono definite a livello normativo e sono fornite solo a scopo di test.**</b></p> -->
</div>
Expand All @@ -31,23 +31,23 @@ <h3 class="">Accedi per continuare sul servizio</h4>
<div class="col-lg-6 text-center border-md-right border-md-bottom">
<!-- Wallet it button section -->
<div class="row">
<h3>IT Wallet</h3>
<h2>IT Wallet</h2>
<p>IT Wallet è il tuo portafoglio nazionale di identità digitale che ti consente di accedere ai servizi in modo <b>semplice e sicuro</b>, mantenendo il <b>controllo sui tuoi dati</b></p>
</div>
<br>
<div class="row">
<div class="col-lg-12 text-center button-container column-buttons">
<!--IT Wallet IDP BUTTON SMALL "ENTRA CON WALLET ID" * begin *-->
<!-- IT Wallet IDP BUTTON SMALL "ENTRA CON WALLET ID" * begin * -->
<a href="https://localhost/Saml2/disco?entityID=wallet"
class="btn btn-primary btn-lg btn-me w-100"
eidas-idp-button="#eidas-idp-button-xlarge-post"
aria-haspopup="false"
aria-expanded="false"
style="font-size: 21px;" >
style="font-size: 21px;">
<span><img class="icon buttonicon" src="/static/wallet-it/wallet_icon.svg" alt="Logo IT Wallet" /></span>
<span>Accedi con IT Wallet</span>
</a>
<!--IT Wallet IDP BUTTON SMALL "ENTRA CON WALLET ID" * end *-->
<!-- IT Wallet IDP BUTTON SMALL "ENTRA CON WALLET ID" * end * -->
</div>
</div>
<div class="row">
Expand All @@ -58,7 +58,7 @@ <h3>IT Wallet</h3>
<div class="col-lg-6 text-center column-buttons">
<div class="border-md-bottom">
<div class="row">
<h3>SPID o CIE</h3>
<h2>SPID o CIE</h2>
<p>Accedi in qualunque momento anche con le identità digitali CIE, se hai la Carta di identità elettronica, o SPID, se hai attivato le credenziali con un gestore accreditato.</p>
</div>
<div class="row">
Expand All @@ -74,13 +74,13 @@ <h3>SPID o CIE</h3>
<div class="row">
<div class="col-lg-12 text-center button-container ">
<div class='ita ita-dropdown ita-l ita-fixed mb-3'>
<a href="#" class="btn btn-outline-primary btn-lg btn-me w-100" spid-idp-button="#spid-idp-button-xlarge-post" aria-haspopup="true" aria-expanded="false">
<span><img class="icon buttonicon" src="/static/spid/spid_icon.svg" onerror="this.src='img/spid-ico-circle-bb.png'; this.onerror=null;" alt=""></span>
<span>Entra con SPID</span>
</a>
<div class='ita-menu' role='menu' data-spid-remote></div>
<a href="#" class="btn btn-outline-primary btn-lg btn-me w-100" spid-idp-button="#spid-idp-button-xlarge-post" aria-haspopup="true" aria-expanded="false">
<span><img class="icon buttonicon" src="/static/spid/spid_icon.svg" onerror="this.src='img/spid-ico-circle-bb.png'; this.onerror=null;" alt=""></span>
<span>Entra con SPID</span>
</a>
<div class='ita-menu' role='menu' data-spid-remote></div>
</div>
</div>
</div>
</div>
<div class="row">
<a href="#">Scopri di più su identitadigitale.gov.it <svg class="icon icon-sm linkicon" ><use style="stroke: #0065cc;" href="./bootstrap-italia/svg/sprites.svg#it-external-link"></use></svg></a>
Expand Down Expand Up @@ -125,12 +125,6 @@ <h3>Altre identità digitali</h3>
</div>
</div>
</div>
<div id="theModal" class="modal fade text-center">
<div class="modal-dialog">
<div class="modal-content">
</div>
</div>
</div>
<!-- Footer -->
<!-- <footer class="it-footer">
<div class="it-footer-main">
Expand Down Expand Up @@ -276,10 +270,10 @@ <h3 class="sr-only">Sezione Link Utili</h3>
</footer> -->
<script src="js/ita.min.js"></script>
<script src="js/bootstrap-italia.bundle.min.js"></script>

<script>
var spid_idps = new Ita;
</script>

</body>
</html>
3 changes: 3 additions & 0 deletions example/static/img/check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions example/static/img/cross.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions example/static/js/qrcode/mu42bxql.js

Large diffs are not rendered by default.

Loading
Loading