Authentication, SSO and SSL: Difference between revisions

Jump to navigation Jump to search
m
Tag: 2017 source edit
Tag: 2017 source edit
Line 74: Line 74:


<syntaxhighlight lang="ini">
<syntaxhighlight lang="ini">
...
    ...


    OIDCProviderMetadataURL https://login.microsoftonline.com/your-tenant-id/v2.0/.well-known/openid-configuration
    OIDCClientID youropenidclient
    OIDCClientSecret yoursecret
    OIDCCryptoPassphrase randomstring
    OIDCRedirectURI https://mydolibarr.example.com/sso_redirect
    OIDCScope "openid email profile"
    OIDCRemoteUserClaim email ^(.*)@


OIDCProviderMetadataURL https://login.microsoftonline.com/your-tenant-id/v2.0/.well-known/openid-configuration
    # Disable openid-connect if using DoliDroid
OIDCClientID youropenidclient
    SetEnvIf User-Agent DoliDroid no-auth
OIDCClientSecret yoursecret
OIDCCryptoPassphrase randomstring
OIDCRedirectURI https://mydolibarr.example.com/sso_redirect
OIDCScope "openid email profile"
OIDCRemoteUserClaim email ^(.*)@


# Disable openid-connect if using DoliDroid
    <Directory /home/.../htdocs>
SetEnvIf User-Agent DoliDroid no-auth
    # Docroot
    AuthType openid-connect
    Require valid-user
    Require env no-auth
    </Directory>


<Directory /home/.../htdocs>
    # Disallow openid-connect on some public pages or services
# Docroot
    # Leaving /public and /api, /dav, .well_known but also wrappers for document, viewimage and public json/img accessible to everyone
AuthType openid-connect
    <Directory /home/admin/wwwroot/dolibarr/htdocs/public/>
Require valid-user
        AuthType None
Require env no-auth
        Satisfy any
</Directory>
        Require all granted
    </Directory>
    <Directory /home/admin/wwwroot/dolibarr/htdocs/api/>
        AuthType None
        Satisfy any
        Require all granted
    </Directory>
    <Directory /home/admin/wwwroot/dolibarr/htdocs/dav/>
        AuthType None
        Satisfy any
        Require all granted
    </Directory>
    <Directory /home/admin/wwwroot/dolibarr/htdocs/.well-known/>
        AuthType None
        Satisfy any
        Require all granted
    </Directory>


    <Files ~ "(document\.php|viewimage\.php|\.js\.php|\.json\.php|\.js|\.css\.php|\.css|\.gif|\.png|\.svg|\.woff2|favicon\.ico)$">
        AuthType None
        Require all granted
        Satisfy any
    </Files>
</syntaxhighlight>
</syntaxhighlight>


Navigation menu