Compare commits

...
Sign in to create a new pull request.

3 commits

Author SHA1 Message Date
Nicolas Demangeat
5e3e88ee59 fix: 📝 update traitement.md 2025-05-09 09:05:58 +02:00
Nicolas Demangeat
18d89ab732 fix: ♻️ phpcs 2025-05-06 17:16:49 +02:00
Nicolas Demangeat
b2861e3a80 feat: 📝 add traitement.md 2025-05-06 17:04:23 +02:00
5 changed files with 243 additions and 218 deletions

View file

@ -172,7 +172,7 @@ class UserCreate extends Command
{ {
while (is_null($this->role)) { while (is_null($this->role)) {
try { try {
$tmp = $this->choice( $tmp = $this->choice(
'Select his role', 'Select his role',
[ [
Str::ucFirst(RoleEnum::conceptor->label()), Str::ucFirst(RoleEnum::conceptor->label()),

View file

@ -454,7 +454,7 @@ class Section extends Model
public static function getSections(StaticPageType $type): \Illuminate\Database\Eloquent\Collection public static function getSections(StaticPageType $type): \Illuminate\Database\Eloquent\Collection
{ {
$staticPageModel = StaticPage::query()->where('type', $type)->first(); $staticPageModel = StaticPage::query()->where('type', $type)->first();
$sectionModels = self::where('page_id', $staticPageModel->id)->get(); $sectionModels = self::where('page_id', $staticPageModel->id)->get();
return $sectionModels; return $sectionModels;
} }

View file

@ -47,7 +47,10 @@ class ViewServiceProvider extends ServiceProvider
['name' => 'moveStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::we_move)], ['name' => 'moveStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::we_move)],
['name' => 'produceStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::we_produce)], ['name' => 'produceStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::we_produce)],
['name' => 'listenStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::we_listen)], ['name' => 'listenStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::we_listen)],
['name' => 'confidentialityStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::confidentiality)], [
'name' => 'confidentialityStaticPageModel',
'value' => StaticPage::getStaticPage(StaticPageType::confidentiality)
],
['name' => 'legalsStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::legals)], ['name' => 'legalsStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::legals)],
// * HOME SECTIONS // * HOME SECTIONS
['name' => 'homeSections', 'value' => Section::getSections(StaticPageType::home)], ['name' => 'homeSections', 'value' => Section::getSections(StaticPageType::home)],

View file

@ -3,193 +3,194 @@
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Tenant Model | Tenant Model
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This will allow you to override the tenant model with your own. | This will allow you to override the tenant model with your own.
| |
*/ */
'tenantModel' => \Slides\Saml2\Models\Tenant::class, 'tenantModel' => \Slides\Saml2\Models\Tenant::class,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Use built-in routes | Use built-in routes
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| If "useRoutes" set to true, the package defines five new routes: | If "useRoutes" set to true, the package defines five new routes:
| |
| Method | URI | Name | Method | URI | Name
| -------|---------------------------------|------------------ | -------|---------------------------------|------------------
| POST | {routesPrefix}/{uuid}/acs | saml.acs | POST | {routesPrefix}/{uuid}/acs | saml.acs
| GET | {routesPrefix}/{uuid}/login | saml.login | GET | {routesPrefix}/{uuid}/login | saml.login
| GET | {routesPrefix}/{uuid}/logout | saml.logout | GET | {routesPrefix}/{uuid}/logout | saml.logout
| GET | {routesPrefix}/{uuid}/metadata | saml.metadata | GET | {routesPrefix}/{uuid}/metadata | saml.metadata
| GET | {routesPrefix}/{uuid}/sls | saml.sls | GET | {routesPrefix}/{uuid}/sls | saml.sls
| |
*/ */
'useRoutes' => true, 'useRoutes' => true,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Built-in routes prefix | Built-in routes prefix
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Here you may define the prefix for built-in routes. | Here you may define the prefix for built-in routes.
| |
*/ */
'routesPrefix' => '/saml2', 'routesPrefix' => '/saml2',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Middle groups to use for the SAML routes | Middle groups to use for the SAML routes
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Note, Laravel 5.2 requires a group which includes StartSession | Note, Laravel 5.2 requires a group which includes StartSession
| |
*/ */
'routesMiddleware' => ['saml'], 'routesMiddleware' => ['saml'],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Signature validation | Signature validation
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Set to true if you want to use parameters from $_SERVER to validate the signature. | Set to true if you want to use parameters from $_SERVER to validate the signature.
| |
*/ */
'retrieveParametersFromServer' => false, 'retrieveParametersFromServer' => false,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Login redirection URL. | Login redirection URL.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| The redirection URL after successful login. | The redirection URL after successful login.
| |
*/ */
'loginRoute' => '/bo', 'loginRoute' => '/bo',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Logout redirection URL. | Logout redirection URL.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| The redirection URL after successful logout. | The redirection URL after successful logout.
| |
*/ */
'logoutRoute' => '/bo', 'logoutRoute' => '/bo',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Login error redirection URL. | Login error redirection URL.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| The redirection URL after login failing. | The redirection URL after login failing.
| |
*/ */
'errorRoute' => '/bo/login-error', 'errorRoute' => '/bo/login-error',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Strict mode. | Strict mode.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| If 'strict' is True, then the PHP Toolkit will reject unsigned | If 'strict' is True, then the PHP Toolkit will reject unsigned
| or unencrypted messages if it expects them signed or encrypted | or unencrypted messages if it expects them signed or encrypted
| Also will reject the messages if not strictly follow the SAML | Also will reject the messages if not strictly follow the SAML
| standard: Destination, NameId, Conditions... are validated too. | standard: Destination, NameId, Conditions... are validated too.
| |
*/ */
'strict' => true, 'strict' => true,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Debug mode. | Debug mode.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| When enabled, errors must be printed. | When enabled, errors must be printed.
| |
*/ */
'debug' => env('SAML2_DEBUG', env('APP_DEBUG', false)), 'debug' => env('SAML2_DEBUG', env('APP_DEBUG', false)),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Whether to use `X-Forwarded-*` headers to determine port/domain/protocol. | Whether to use `X-Forwarded-*` headers to determine port/domain/protocol.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| If 'proxyVars' is True, then the Saml lib will trust proxy headers | If 'proxyVars' is True, then the Saml lib will trust proxy headers
| e.g X-Forwarded-Proto / HTTP_X_FORWARDED_PROTO. This is useful if | e.g X-Forwarded-Proto / HTTP_X_FORWARDED_PROTO. This is useful if
| your application is running behind a load balancer which terminates SSL. | your application is running behind a load balancer which terminates SSL.
| |
*/ */
'proxyVars' => true, 'proxyVars' => true,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Service Provider configuration. | Service Provider configuration.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| General setting of the service provider. | General setting of the service provider.
| |
*/ */
'sp' => [ 'sp' => [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| NameID format. | NameID format.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Specifies constraints on the name identifier to be used to | Specifies constraints on the name identifier to be used to
| represent the requested subject. | represent the requested subject.
| |
*/ */
'NameIDFormat' => 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress', 'NameIDFormat' => 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| SP Certificates. | SP Certificates.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Usually x509cert and privateKey of the SP are provided by files placed at | Usually x509cert and privateKey of the SP are provided by files placed at
| the certs folder. But we can also provide them with the following parameters. | the certs folder. But we can also provide them with the following parameters.
| |
*/ */
'x509cert' => env('SAML2_SP_CERT_x509', ''), 'x509cert' => env('SAML2_SP_CERT_x509', ''),
'privateKey' => env('SAML2_SP_CERT_PRIVATEKEY', ''), 'privateKey' => env('SAML2_SP_CERT_PRIVATEKEY', ''),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Identifier (URI) of the SP entity. | Identifier (URI) of the SP entity.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Leave blank to use the 'saml.metadata' route. | Leave blank to use the 'saml.metadata' route.
| |
*/ */
'entityId' => env('SAML2_SP_ENTITYID', ''), 'entityId' => env('SAML2_SP_ENTITYID', ''),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| The Assertion Consumer Service (ACS) URL. | The Assertion Consumer Service (ACS) URL.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| URL Location where the <Response> from the IdP will be returned, using HTTP-POST binding. | URL Location where the <Response> from the IdP will be returned, using HTTP-POST binding.
| Leave blank to use the 'saml.acs' route. | Leave blank to use the 'saml.acs' route.
| |
*/ */
'assertionConsumerService' => [ 'assertionConsumerService' => [
@ -197,16 +198,16 @@ return [
], ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| The Single Logout Service URL. | The Single Logout Service URL.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Specifies info about where and how the <Logout Response> message MUST be | Specifies info about where and how the <Logout Response> message MUST be
| returned to the requester, in this case our SP. | returned to the requester, in this case our SP.
| |
| URL Location where the <Response> from the IdP will be returned, using HTTP-Redirect binding. | URL Location where the <Response> from the IdP will be returned, using HTTP-Redirect binding.
| Leave blank to use the 'saml.sls' route. | Leave blank to use the 'saml.sls' route.
| |
*/ */
'singleLogoutService' => [ 'singleLogoutService' => [
@ -215,12 +216,12 @@ return [
], ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| OneLogin security settings. | OneLogin security settings.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| |
| |
*/ */
'security' => [ 'security' => [
@ -229,133 +230,133 @@ return [
'digestAlgorithm' => 'http://www.w3.org/2001/04/xmlenc#sha256', 'digestAlgorithm' => 'http://www.w3.org/2001/04/xmlenc#sha256',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| NameId encryption | NameId encryption
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Indicates that the nameID of the <samlp:logoutRequest> sent by this SP | Indicates that the nameID of the <samlp:logoutRequest> sent by this SP
| will be encrypted. | will be encrypted.
| |
*/ */
'nameIdEncrypted' => true, 'nameIdEncrypted' => true,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| AuthnRequest signage | AuthnRequest signage
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Indicates whether the <samlp:AuthnRequest> messages sent by | Indicates whether the <samlp:AuthnRequest> messages sent by
| this SP will be signed. The Metadata of the SP will offer this info | this SP will be signed. The Metadata of the SP will offer this info
| |
*/ */
'authnRequestsSigned' => true, 'authnRequestsSigned' => true,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Logout request signage | Logout request signage
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Indicates whether the <samlp:logoutRequest> messages sent by this SP | Indicates whether the <samlp:logoutRequest> messages sent by this SP
| will be signed. | will be signed.
| |
*/ */
'logoutRequestSigned' => true, 'logoutRequestSigned' => true,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Logout response signage | Logout response signage
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Indicates whether the <samlp:logoutResponse> messages sent by this SP | Indicates whether the <samlp:logoutResponse> messages sent by this SP
| will be signed. | will be signed.
| |
*/ */
'logoutResponseSigned' => true, 'logoutResponseSigned' => true,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Whether need to sign metadata. | Whether need to sign metadata.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| The possible values: | The possible values:
| - false | - false
| - true (use certs) | - true (use certs)
| - array: | - array:
| ``` | ```
| [ | [
| 'keyFileName' => 'metadata.key', | 'keyFileName' => 'metadata.key',
| 'certFileName' => 'metadata.crt' | 'certFileName' => 'metadata.crt'
| ] | ]
| ``` | ```
| |
*/ */
'signMetadata' => true, 'signMetadata' => true,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Requirement to sign messages. | Requirement to sign messages.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Indicates a requirement for the <samlp:Response>, <samlp:LogoutRequest> and | Indicates a requirement for the <samlp:Response>, <samlp:LogoutRequest> and
| <samlp:LogoutResponse> elements received by this SP to be signed. | <samlp:LogoutResponse> elements received by this SP to be signed.
| |
*/ */
'wantMessagesSigned' => true, 'wantMessagesSigned' => true,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Requirement to sign assertion elements. | Requirement to sign assertion elements.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Indicates a requirement for the <saml:Assertion> elements received by | Indicates a requirement for the <saml:Assertion> elements received by
| this SP to be signed. | this SP to be signed.
| |
*/ */
'wantAssertionsSigned' => true, 'wantAssertionsSigned' => true,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Requirement to encrypt NameID. | Requirement to encrypt NameID.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Indicates a requirement for the NameID received by this SP to be encrypted. | Indicates a requirement for the NameID received by this SP to be encrypted.
| |
*/ */
'wantNameIdEncrypted' => false, 'wantNameIdEncrypted' => false,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Authentication context. | Authentication context.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Set to false and no AuthContext will be sent in the AuthNRequest, | Set to false and no AuthContext will be sent in the AuthNRequest,
| |
| Set true or don't present this parameter and you will get an | Set true or don't present this parameter and you will get an
| AuthContext 'exact' 'urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport' | AuthContext 'exact' 'urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport'
| |
| Set an array with the possible auth context values: | Set an array with the possible auth context values:
| ['urn:oasis:names:tc:SAML:2.0:ac:classes:Password', 'urn:oasis:names:tc:SAML:2.0:ac:classes:X509'] | ['urn:oasis:names:tc:SAML:2.0:ac:classes:Password', 'urn:oasis:names:tc:SAML:2.0:ac:classes:X509']
| |
*/ */
'requestedAuthnContext' => true, 'requestedAuthnContext' => true,
], ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Contact information. | Contact information.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| It is recommended to supply a technical and support contacts. | It is recommended to supply a technical and support contacts.
| |
*/ */
'contactPerson' => [ 'contactPerson' => [
@ -371,12 +372,12 @@ return [
], ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Organization information. | Organization information.
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| The info in en_US lang is recommended, add more if required. | The info in en_US lang is recommended, add more if required.
| |
*/ */
'organization' => [ 'organization' => [

21
traitement.md Normal file
View file

@ -0,0 +1,21 @@
# Listing des données sensible
## BASE
### users
- first_name : Prénom
- last_name : Nom de famille
- email : email perso
### testimonials
- name : nom de la personne témoignant
- job : emploi de la personne témoignant
### sites
- name : nom du site
- employees : nombres d'employés du site
- address : adresse du site
- phone_number : numéro de téléphone du site
- director_name : Nom du directeur du site
- employee_name : nom de l'employé associé au speach
- latitude : latitude du site
- longitude : longitude du site