Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
    <urls>
        <pair-key>/**</pair-key>
        <pair-value>authcBasic, anyroles["admin,provision"]</pair-value>
    </urls>

Configuration

ConfigFile $ODL_HOME/etc/oauth-provider.config.json

Code Block
{
    "tokenSecret": "${OAUTH_TOKEN_SECRET}",
    "tokenIssuer": "${OAUTH_TOKEN_ISSUER}",
    "publicUrl": "",
    "redirectUri": "${OAUTH_ODLUX_REDIRECT_URI}",
    "supportOdlUsers": "${OAUTH_SUPPORT_ODLUSERS}",
    "providers": []
}


keydefaultdescription
tokenSecretrandomgeneratedString()secret to create JWT
tokenIssuer"Opendaylight"issuer for JWT

publicUrl

autodetect()url on which odlux webserver is reachable for you. Attention!!!! Be aware behind reverse proxy!! pls set to your reverse proxy url
redirectUri"/odlux/index.html#/oauth?token="redirect after successful oauth login
supportOdlUsers"true"enable login of internal odl configured users

Gitlab as a OAuth provider

Code Block
{
    "tokenSecret": "${OAUTH_TOKEN_SECRET}",
    "tokenIssuer": "${OAUTH_TOKEN_ISSUER}",
    "publicUrl": "",
    "redirectUri": "${OAUTH_ODLUX_REDIRECT_URI}",
    "supportOdlUsers": "true",
    "providers": [
    	{
            "id": "mygit",
            "type": "GITLAB",
            "url": "https://my-gitlab-server.com",
            "clientId": "db312fb791ebc97fd199df1569ebbd45916f52444bb75",
            "secret": "d376abb4524bc7fbd80833ad34f649584624e0c2b791da",
            "scope": "api+openid+read_user+profile",
            "title": "my Gitlab",
            "roleMapping":{
                "mygitlabgroup":"admin"
            }
        }
    ]
}


keydescription
ididentifier for provider-entry (  regex: [ a-zA-Z0-9]+ )
typeimplementation-type GITLAB | KEYCLOAK | NEXTCLOUD
urlurl of server
clientIdshared client-id between OAuth provider and Oauth client
secretshared secret between OAuth provider and Oauth client
scopeenabled scopes on oauth-provider side
titletitle shown in odlux GUI
roleMapping

HashMap for roles from oauth-provider to odl

{

    "oauth-provider-role":"odl-role"

}