How to install the backend#
Install pas.plugins.identity in a Plone site and confirm it works.
This guide covers the backend only. The frontend is a separate package and a separate guide: How to install the frontend.
Note
There are no GenericSetup upgrade steps in this release. See How to upgrade before taking a new alpha, and Stability for what that implies.
Requirements#
Plone |
6.2 |
Python |
3.12, 3.13, or 3.14 |
Frontend |
Volto, for sign-in. Classic UI is not supported yet—see Stability |
Install the backend#
These steps are for a project generated by
cookieplone, which is the layout a Plone
6 project has. Paths are relative to backend/, and <yourpackage> is the
package under src/.
Declare the dependency in
pyproject.toml:dependencies = [ "Products.CMFPlone", "plone.api", "plone.restapi", "plone.volto", "pas.plugins.identity", ]
Two extras exist, and neither is needed for ordinary sign-in:
Extra
Adds
Also needs
serverThe authorization server layer, with a GenericSetup profile of its own.
its profile, in step 3
sqlAn audit sink writing a row per event to a relational database.
IDENTITY_AUDIT_DSN, andsqlnamed inaudit_sinksAsk for one by naming it in the requirement,
"pas.plugins.identity[server]". See The audit log for thesqlsink.Load its ZCML, in
src/<yourpackage>/dependencies.zcml:<configure xmlns="http://namespaces.zope.org/zope"> <include package="pas.plugins.identity" /> </configure>
Your package's
configure.zcmlalready pulls that file in with<include file="dependencies.zcml" />. Installing the distribution is not enough on its own: without theinclude, nothing registers and the add-on does not appear in the control panel.Install it with your own package, in
src/<yourpackage>/profiles/default/metadata.xml:<?xml version="1.0" encoding="utf-8"?> <metadata> <version>1000</version> <dependencies> <dependency>profile-pas.plugins.identity:default</dependency> </dependencies> </metadata>
Naming it here is what makes a fresh site arrive configured, rather than waiting for somebody to remember the add-ons control panel.
For the authorization server, name both profiles, in this order:
<dependencies> <dependency>profile-pas.plugins.identity:default</dependency> <dependency>profile-pas.plugins.identity.server:default</dependency> </dependencies>
pas.plugins.identity:defaultinstalls everything the core layer needs: the control panel, both PAS plugins, theUserProfileandUserGroupcontent types with their workflows, and the catalog they are filed in. It also sets the registry records described in Users and groups as content and points them at this package's own types.Ship your settings as configuration, in
src/<yourpackage>/profiles/default/registry/pas.plugins.identity.xml:<?xml version="1.0" encoding="utf-8"?> <registry> <records interface="pas.plugins.identity.core.controlpanel.interfaces.IIdentitySettings" prefix="pas.plugins.identity" > <value key="callback_url">/login-identity</value> <value key="audit_record_pii">False</value> </records> </registry>
Every record in Settings can be set this way, so a deployment's configuration lives in the repository and arrives with the profile instead of being typed into a control panel on each environment.
Provider secrets are the exception. They are write-only and a GenericSetup export omits them, so keep them out of these files and set them per environment. See About secrets.
Restart the Plone instance, then apply your own package's profile.
This is a ZCML change, so the site does not see the add-on until it restarts.
Note
To install into a site that already exists, without touching your package, use
the add-ons control panel or apply pas.plugins.identity:default from
portal_setup. The server layer is its own entry there, with its own install
and uninstall button; the panel shows no version beside it, because the entry
is named after a package rather than a distribution.
Set the login callback URL#
Nothing signs in until this matches what your providers have registered.
Open the Identity providers control panel.
Set Callback URL to the frontend route that providers redirect back to.
The default is
/login-identity, which is the route the Volto add-on registers. Most sites never change it.
The value is a path, and the full redirect URI you give a provider is your frontend's base URL plus that path:
https://www.example.com/login-identity
It is a route in the Volto frontend rather than a backend view, so the package cannot derive it from the portal URL. That is why it is a setting.
Verify#
A working install has all four of these:
the
identityplugin inacl_users, active for extraction, authentication, and credentials resetthe
identity_profileplugin beside it, at the top ofIPropertiesPluginat least one provider in the control panel, with a title and a driver
a callback URL that matches what the provider has registered
Uninstalling#
Every profile has a matching uninstall profile, and uninstalling is tested: the test installs, uninstalls, and asserts that the site still works with no plugin, registry key, or tool left behind.
Note
Uninstalling removes the catalog, the content types, and the workflows.
It leaves every UserProfile object and its data exactly where it is.
Uninstalling an add-on is a configuration change, not an instruction to delete everyone's account data.
Next steps#
How to install the frontend—the Volto add-on, without which nobody can sign in.
Provider recipes—pick the provider you are adding and follow its recipe.
How to troubleshoot sign-in—if sign-in fails, start here rather than in the source.