triauth for XWikiOIDC
Let your team open XWiki with one approval on their own device, and no XWiki passwords.
- Sign-in through
- OpenID Connect bridge
- Available in
- XWiki 14.10 and newer, with the OpenID Connect Authenticator
- Set up in
- xwiki.properties
About XWiki
XWiki is a wiki and knowledge-base platform for documentation and intranets, with structured pages, applications built inside the wiki, and a large extension catalogue. Companies run it themselves or buy hosting and support from its vendor.
Connect XWiki to triauth
XWiki signs people in through the triauth OpenID Connect bridge, with its OpenID Connect Authenticator extension. Once connected, XWiki's Log in link goes straight to the bridge. People on your team type their username and approve on their own device, and XWiki creates or updates their profile. Nobody keeps an XWiki password, and when someone leaves, removing their identity records at your domain ends their access to the wiki as well.
How it works
In the Extension Manager, install OpenID Connect Authenticator.
Open oidc.triauth.org and enter your domain. Paste the wiki's redirect address,
https://wiki.example.com/xwiki/oidc/authenticator/callbackwith your own wiki address in place ofwiki.example.com, and click Connect app. The bridge gives you a client ID and a client secret.In
xwiki.cfg, point the authentication class at the extension:inixwiki.authentication.authclass=org.xwiki.contrib.oidc.auth.OIDCAuthServiceImplThen add the settings below to
xwiki.properties, with your domain in place ofexample.comand the two placeholders replaced by the client ID and the client secret from the bridge, and restart XWiki.inioidc.provider=https://oidc.triauth.org/example.com oidc.clientid=<client ID from the bridge> oidc.secret=<client secret from the bridge> oidc.scope=openid,profile,email,groups,offline_access oidc.userinfoclaims=groups oidc.groups.claim=groups oidc.user.nameFormater=${oidc.user.preferredUsername._clean}Open the wiki and click Log in.
Checkpoint
XWiki's Log in link opens a page from the bridge that asks for the username, and the person's authenticator asks them to approve. The wiki then shows their new profile.
Good to know
- Everyone with an identity at your domain gets a wiki profile the first time they sign in. To let only one team in, limit the app to a group when you connect it, or list the allowed groups in
oidc.groups.allowed. - The groups published at your domain become XWiki groups, created when missing and renamed through
oidc.groups.mappingif you like. - XWiki re-reads the profile and the groups from the bridge at the interval in
oidc.userinforefreshrate, usually ten minutes, and renews the sign-in when its token expires. A failed renewal signs the person out, so a session follows the identity.
For the person who connects the app
| Setting | Value |
|---|---|
| Redirect address | https://<your-wiki>/xwiki/oidc/authenticator/callback. With short URLs, add oidc to the known entry points |
| Where in XWiki | xwiki.cfg and xwiki.properties, or client configuration objects inside the wiki |
| Provider | oidc.provider takes https://oidc.triauth.org/<your domain>, and the rest comes from the discovery document. The extension's own example provider carries a path too |
| Scopes | without the address and phone scopes of the default, which the bridge does not offer, and with offline_access, which lets the extension renew the sign-in. The renewal sends the client secret, so the app must keep one. A failed renewal, also one during a bridge outage, ends the wiki session in the background |
| User names | oidc.user.nameFormater as above takes the wiki user name from the person's username, with dots and hyphens removed. Without it, XWiki prefixes the issuer's host name, as in oidctriauthorg-john |
The extension keeps the client secret, so leave This app can't keep a secret unticked when you connect it on the bridge. The extension page explains every property.
Next steps
- Read the OpenID Connect bridge page for what every connected app gets and what the bridge keeps private.
- Read Roll out to your team to give everyone in your organization an identifier at your domain.
- Read Groups to publish teams and see them appear as wiki groups.
- Read the extension page for every property the authenticator offers.
All logos and trademarks belong to their respective owners and do not imply affiliation or endorsement of the organization or product by triauth, nor vice versa. The content provided on this page may include information from third-party sources. We do not assume any responsibility for the completeness, correctness, or applicability of the information. You should independently verify any details before relying on them.