| 1 |
ProConnect |
| 2 |
========== |
| 3 |
|
| 4 |
|image0| |
| 5 |
|
| 6 |
Presentation |
| 7 |
------------ |
| 8 |
|
| 9 |
`ProConnect <https://agentconnect.gouv.fr/>`__ is an |
| 10 |
authentication platform made by French government. |
| 11 |
It relies on OpenID Connect protocol. |
| 12 |
|
| 13 |
To select on which Identity Provider the user will be redirected, |
| 14 |
ProConnect relies on the email domain. |
| 15 |
|
| 16 |
.. tip:: |
| 17 |
|
| 18 |
All users of an email domain will use the same Identity Provider. |
| 19 |
|
| 20 |
|
| 21 |
LemonLDAP::NG can be used as Relying Party or OpenID Provider for ProConnect. |
| 22 |
|
| 23 |
Official documentation is available on `partner website <https://partenaires.proconnect.gouv.fr/docs>`__. |
| 24 |
|
| 25 |
LL::NG as OpenID Provider |
| 26 |
------------------------- |
| 27 |
|
| 28 |
Registration on ProConnect |
| 29 |
^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 30 |
|
| 31 |
You need to `fill a form <https://www.demarches-simplifiees.fr/commencer/demande-creation-fi-fca>`__ to request the authorization of using ProConnect. |
| 32 |
|
| 33 |
You will provide one or more mail domains that will be associated with your Identity Provider. |
| 34 |
|
| 35 |
Once the configuration is done on LL::NG, you will send them the client ID, client secret and OIDC metadata URL. |
| 36 |
|
| 37 |
Configuration on LemonLDAP::NG |
| 38 |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 39 |
|
| 40 |
Add ProConnect as Relying Party, with these options: |
| 41 |
|
| 42 |
* Client ID / Client Secret: generate random values |
| 43 |
* Redirect URIs: https://auth.agentconnect.gouv.fr/api/v2/oidc-callback |
| 44 |
* Redirect Logout URIs: https://auth.agentconnect.gouv.fr/api/v2/client/logout-callback |
| 45 |
* Exported attributes: |
| 46 |
|
| 47 |
* email (mandatory) |
| 48 |
* given_name (mandatory) |
| 49 |
* name (mandatory) |
| 50 |
* organizational_unit (must not contain some special characters, listed in this regex `/^[^.*?{}()|[\]\t\r\n\\]*$/`) |
| 51 |
* phone |
| 52 |
* preferred_username |
| 53 |
* siret |
| 54 |
* uid (mandatory, must contain only ASCII characters) |
| 55 |
* usual_name (mandatory) |
| 56 |
|
| 57 |
* User attribute: be sure to choose a unique and persistent attribute |
| 58 |
* ID Token signature algorithm: RS256 |
| 59 |
* UserInfo response format: JWT/RS256 |
| 60 |
* Scope / Scope value contents: |
| 61 |
|
| 62 |
* given_name: given_name |
| 63 |
* organizational_unit: organizational_unit |
| 64 |
* phone: phone |
| 65 |
* siret: siret |
| 66 |
* uid: uid |
| 67 |
* usual_name: usual_name |
| 68 |
|
| 69 |
To match authencation levels required by ProConnect, you must adapt the corresponding levels in `OpenID Connect Service` > `Authentication context`. You need at least the `eidas1` level. |
| 70 |
|
| 71 |
.. tip:: |
| 72 |
For test platform, you need to use the URLs listed on `this page <https://partenaires.proconnect.gouv.fr/docs/ressources/valeur_ac_domain>`__. |
| 73 |
|
| 74 |
|
| 75 |
Configuration with CLI |
| 76 |
^^^^^^^^^^^^^^^^^^^^^^ |
| 77 |
|
| 78 |
If you want to configure it through CLI, you can adapt the following commands. |
| 79 |
|
| 80 |
* Main paarameters |
| 81 |
|
| 82 |
:: |
| 83 |
|
| 84 |
/usr/share/lemonldap-ng/bin/lemonldap-ng-cli -yes 1 \ |
| 85 |
addKey \ |
| 86 |
oidcRPMetaDataOptions/rp-proconnect oidcRPMetaDataOptionsAccessTokenExpiration 120 \ |
| 87 |
oidcRPMetaDataOptions/rp-proconnect oidcRPMetaDataOptionsClientID client-id-for-proconnect \ |
| 88 |
oidcRPMetaDataOptions/rp-proconnect oidcRPMetaDataOptionsClientSecret client-secret-for-proconnect \ |
| 89 |
oidcRPMetaDataOptions/rp-proconnect oidcRPMetaDataOptionsIDTokenExpiration 3600 \ |
| 90 |
oidcRPMetaDataOptions/rp-proconnect oidcRPMetaDataOptionsIDTokenSignAlg RS256 \ |
| 91 |
oidcRPMetaDataOptions/rp-proconnect oidcRPMetaDataOptionsPostLogoutRedirectUris https://auth.agentconnect.gouv.fr/api/v2/client/logout-callback \ |
| 92 |
oidcRPMetaDataOptions/rp-proconnect oidcRPMetaDataOptionsRedirectUris https://auth.agentconnect.gouv.fr/api/v2/oidc-callback \ |
| 93 |
oidcRPMetaDataOptions/rp-proconnect oidcRPMetaDataOptionsUserIDAttr uid \ |
| 94 |
oidcRPMetaDataOptions/rp-proconnect oidcRPMetaDataOptionsUserInfoSignAlg RS256 |
| 95 |
|
| 96 |
|
| 97 |
* Attributes |
| 98 |
|
| 99 |
:: |
| 100 |
|
| 101 |
/usr/share/lemonldap-ng/bin/lemonldap-ng-cli -yes 1 \ |
| 102 |
addKey \ |
| 103 |
oidcRPMetaDataExportedVars/rp-proconnect email mail \ |
| 104 |
oidcRPMetaDataExportedVars/rp-proconnect given_name givenName \ |
| 105 |
oidcRPMetaDataExportedVars/rp-proconnect name cn \ |
| 106 |
oidcRPMetaDataExportedVars/rp-proconnect organizational_unit ou \ |
| 107 |
oidcRPMetaDataExportedVars/rp-proconnect phone telephoneNumber \ |
| 108 |
oidcRPMetaDataExportedVars/rp-proconnect preferred_username displayName \ |
| 109 |
oidcRPMetaDataExportedVars/rp-proconnect siret deparmentNumber \ |
| 110 |
oidcRPMetaDataExportedVars/rp-proconnect uid uid \ |
| 111 |
oidcRPMetaDataExportedVars/rp-proconnect usual_name sn |
| 112 |
|
| 113 |
* Extra scopes (only needed if you did not configure LL::NG to automatically send all exported attributes by default) |
| 114 |
|
| 115 |
:: |
| 116 |
|
| 117 |
/usr/share/lemonldap-ng/bin/lemonldap-ng-cli -yes 1 \ |
| 118 |
addKey \ |
| 119 |
oidcRPMetaDataOptionsExtraClaims/rp-proconnect given_name given_name \ |
| 120 |
oidcRPMetaDataOptionsExtraClaims/rp-proconnect organizational_unit organizational_unit \ |
| 121 |
oidcRPMetaDataOptionsExtraClaims/rp-proconnect phone phone \ |
| 122 |
oidcRPMetaDataOptionsExtraClaims/rp-proconnect siret siret \ |
| 123 |
oidcRPMetaDataOptionsExtraClaims/rp-proconnect uid uid \ |
| 124 |
oidcRPMetaDataOptionsExtraClaims/rp-proconnect usual_name usual_name |
| 125 |
|
| 126 |
|
| 127 |
LL::NG as Relying Party |
| 128 |
----------------------- |
| 129 |
|
| 130 |
Registration on ProConnect |
| 131 |
^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 132 |
|
| 133 |
Use the `partner website <https://partenaires.proconnect.gouv.fr/>`__ to declare your application in test. |
| 134 |
Production needs a DataPass request. |
| 135 |
|
| 136 |
Fill these informations: |
| 137 |
|
| 138 |
* Application name |
| 139 |
* Login URL: your portal URL with the OIDC callback parameter, for example: ``https://auth.example.com/?openidconnectcallback=1`` |
| 140 |
* Logout URL: your portal URL with logout parameter, for example: ``https://auth.example.com/?logout=1`` |
| 141 |
* Signature algorithm: use recommanded values, for example RS256 |
| 142 |
|
| 143 |
Copy client ID and client secret, they are required to configure ProConnect OpenID Provider on LL::NG. |
| 144 |
|
| 145 |
Configuration on LemonLDAP::NG |
| 146 |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 147 |
|
| 148 |
Add ProConnect as OpenID Provider, with these options: |
| 149 |
|
| 150 |
* Metadata: get metadata from `test <https://fca.integ01.dev-agentconnect.fr/api/v2/.well-known/openid-configuration>`__ or `production <https://auth.agentconnect.gouv.fr/api/v2/.well-known/openid-configuration>`__ |
| 151 |
* Exported attributes: |
| 152 |
|
| 153 |
* givenName: given_name |
| 154 |
* idp_id: idp_id |
| 155 |
* mail: email |
| 156 |
* siret: siret |
| 157 |
* sn: usual_name |
| 158 |
* telephoneNumber: phone_number |
| 159 |
* uid: uid |
| 160 |
|
| 161 |
* Options: |
| 162 |
|
| 163 |
* Configuration: |
| 164 |
|
| 165 |
* Store ID Token: On (required for logout) |
| 166 |
* Configuration endpoint: set metadata URL |
| 167 |
* Client ID/Client Secret: put values given by ProConnect |
| 168 |
|
| 169 |
* Protocol: |
| 170 |
|
| 171 |
* Scope: openid given_name usual_name email uid siret idp_id phone |
| 172 |
|
| 173 |
Configuration with CLI |
| 174 |
^^^^^^^^^^^^^^^^^^^^^^ |
| 175 |
|
| 176 |
If you want to configure it through CLI, you can adapt the following commands. |
| 177 |
|
| 178 |
* Metadata (adapt URL to test or production) |
| 179 |
|
| 180 |
:: |
| 181 |
|
| 182 |
curl https://auth.agentconnect.gouv.fr/api/v2/.well-known/openid-configuration > /tmp/metadata-proconnect.json |
| 183 |
|
| 184 |
/usr/share/lemonldap-ng/bin/lemonldap-ng-cli -yes 1 \ |
| 185 |
addKey \ |
| 186 |
oidcOPMetaDataJSON op-proconnect `cat /tmp/metadata-proconnect.json` |
| 187 |
|
| 188 |
* Attributes |
| 189 |
|
| 190 |
:: |
| 191 |
|
| 192 |
/usr/share/lemonldap-ng/bin/lemonldap-ng-cli -yes 1 \ |
| 193 |
addKey \ |
| 194 |
oidcOPMetaDataExportedVars/op-proconnect givenName given_name \ |
| 195 |
oidcOPMetaDataExportedVars/op-proconnect idp_id idp_id \ |
| 196 |
oidcOPMetaDataExportedVars/op-proconnect mail email \ |
| 197 |
oidcOPMetaDataExportedVars/op-proconnect siret siret \ |
| 198 |
oidcOPMetaDataExportedVars/op-proconnect sn usual_name \ |
| 199 |
oidcOPMetaDataExportedVars/op-proconnect telephoneNumber phone_number \ |
| 200 |
oidcOPMetaDataExportedVars/op-proconnect uid uid |
| 201 |
|
| 202 |
|
| 203 |
* Options (replace client ID, client secret and metadata URL) |
| 204 |
|
| 205 |
:: |
| 206 |
|
| 207 |
/usr/share/lemonldap-ng/bin/lemonldap-ng-cli -yes 1 \ |
| 208 |
addKey \ |
| 209 |
oidcOPMetaDataOptions/op-proconnect oidcOPMetaDataOptionsAuthnEndpointAuthSigAlg RS256 \ |
| 210 |
oidcOPMetaDataOptions/op-proconnect oidcOPMetaDataOptionsCheckJWTSignature 1 \ |
| 211 |
oidcOPMetaDataOptions/op-proconnect oidcOPMetaDataOptionsClientID <client ID> \ |
| 212 |
oidcOPMetaDataOptions/op-proconnect oidcOPMetaDataOptionsClientSecret <cliebt secret> \ |
| 213 |
oidcOPMetaDataOptions/op-proconnect oidcOPMetaDataOptionsConfigurationURI <metadata URL> \ |
| 214 |
oidcOPMetaDataOptions/op-proconnect oidcOPMetaDataOptionsIDTokenMaxAge 30 \ |
| 215 |
oidcOPMetaDataOptions/op-proconnect oidcOPMetaDataOptionsJWKSTimeout 0 \ |
| 216 |
oidcOPMetaDataOptions/op-proconnect oidcOPMetaDataOptionsMaxAge 0 \ |
| 217 |
oidcOPMetaDataOptions/op-proconnect oidcOPMetaDataOptionsNoJwtHeader 0 \ |
| 218 |
oidcOPMetaDataOptions/op-proconnect oidcOPMetaDataOptionsRequirePkce 0 \ |
| 219 |
oidcOPMetaDataOptions/op-proconnect oidcOPMetaDataOptionsScope openid given_name usual_name email uid siret idp_id phone custom \ |
| 220 |
oidcOPMetaDataOptions/op-proconnect oidcOPMetaDataOptionsStoreIDToken 1 \ |
| 221 |
oidcOPMetaDataOptions/op-proconnect oidcOPMetaDataOptionsTokenEndpointAuthMethod client_secret_post \ |
| 222 |
oidcOPMetaDataOptions/op-proconnect oidcOPMetaDataOptionsUseNonce 1 \ |
| 223 |
oidcOPMetaDataOptions/op-proconnect oidcOPMetaDataOptionsUserinfoSource userinfo |
| 224 |
|
| 225 |
.. |image0| image:: /applications/proconnect.svg |
| 226 |
:class: align-center |
| 227 |
:width: 300px |