Teams

A team gives a group of tokens its own quarantine and rules, such as strict for production CI and looser for experiments. Everything a team doesn't set follows the Settings page.

What a team changes

Without teams, every token follows the same policy: the one under Settings. A team lets one group of tokens follow a different one. A team can set:

  • Its own quarantine, from 0 up to 365 days.
  • Its own action and setting for any risk rule, such as New publisher on block, or a different Minimum severity for Known vulnerabilities.

Anything a team leaves as Same as everyone follows the Settings page, including later changes to it. A team only affects requests made with its tokens. People's sign-ins to the web UI and AI agents use the default policy.

Teams also decide who owns a project or build name. See who can report a project or build.

What a team can't change

  • Known malware and a person's decision on a package. These apply to everyone. A team can't allow a version that is reported as malware, or that an admin blocked.
  • A quarantine set for one package. A window set on a package's page is the most specific decision, so it still wins over the team's window.
  • Settings from the config file, if the team was made in the UI. A rule set in the config file shows In code on the team's page. A registry quarantine set in the config file shows a note under Quarantine. A team made in the UI can't change either. A team defined in the config file can.

See which window applies for where a team's window sits among the others.

Create a team

  1. Name it

    As an admin, open Teams under Policy. Under Create a team, enter a Name such as production-ci and select Create team. A name can have up to 60 letters, numbers, spaces, dots, dashes and underscores, and starts with a letter or number.

  2. Set its quarantine

    On the team's page, under Quarantine, choose Same as everyone, or choose Its own and enter a number of days or hours.

  3. Change its rules

    Under Rules, open the list of rules. For each rule you want to change, choose an Action and, if the rule has one, its setting. Each row shows what everyone else gets.

  4. Save it

    Select Save and the team's name. Rules you changed then show at the top of the list.

  5. Give it tokens

    A team has no effect until it has tokens. See assign tokens.

On the Teams page, each team's card shows how many tokens it has and what it changes. A team that changes nothing says so.

To delete a team, open Delete this team on its page. Its tokens go back to the default policy on their next request.

Assign tokens

A token belongs to at most one team. Its next request uses the team's policy. A token with no team follows the default policy.

  • When creating a token, an admin chooses its Team under Access tokens, or leaves it on Default policy.
  • To move an existing token, an admin chooses a team in the token's row under Access tokens and selects Move.
  • Personal tokens follow their owner. A personal token with no team joins its owner's team, if they have exactly one. Someone in several teams chooses one when creating a token, and can only choose a team they belong to.
  • Bot tokens don't follow a person, so their team stays what an admin chose.

The team's page lists its tokens under Tokens. See Access tokens.

Teams from identity provider groups

A team can take its people from your identity provider. On the team's page, under People, enter one or more Identity provider groups, separated by commas. People in those groups join the team without an admin doing anything, and so do their personal tokens.

  • Leaving is automatic. Once someone leaves a team's groups, their personal tokens stop acting for it. An admin's earlier choice doesn't keep them there.
  • How fresh it is. With SCIM, changes apply at once. With OIDC, SAML and LDAP, a person's groups are as fresh as their last sign-in. Without SCIM, someone who left keeps the team on their tokens until they next sign in.
  • If your provider sends no groups, people lose their teams instead of keeping stale ones. Microsoft Entra ID sends group IDs instead of names unless told otherwise, and leaves groups out for people in too many groups. Use SCIM or a filtered groups claim there.

See Sign-in to connect your identity provider.

Set teams in the config file

Teams can also live in pratique.yaml. A team in the file shows In code and can't be changed in the UI.

yamlpratique.yaml
access:
  client_tokens:
    ci: ${PRATIQUE_CI_TOKEN}
  claim_needs_team: true     # someone with no team can't claim a new project or build name

teams:
  - name: production-ci
    quarantine: 14d
    rules:
      new-publisher: { action: block }
    tokens: [ci]               # names under access.client_tokens
  - name: payments
    groups: [payments-devs]   # identity provider groups whose people join

Each team takes these keys:

  • name: unique, with the same characters as in the UI.
  • quarantine: a window such as 14d or 36h, or 0 for none. Leave it out to use everyone's window.
  • rules: rules by code, in the same form as the top-level rules. See Risk rules.
  • tokens: names of bot tokens under access.client_tokens.
  • groups: identity provider groups whose people join the team.

Check a team's policy

To see what a team's tokens get for a package, open the package, go to the Versions tab, open the Team policy filter, choose the team and select Apply. The versions table then shows that team's decisions. Choose Everyone to go back. See Package pages.

Activity shows each request under the token that made it, so you can also search by client: to see what one team's bots were given.

Who can report a project or build

CI reports projects and builds to Pratique. These records decide who gets a malware alert and what storage cleanup keeps, so a token can't rewrite what another team reported. Each project or build name belongs to one owner. Projects and builds share one set of names.

  • The first report claims the name. It goes to the token's team, or to the person or bot if the token has no team.
  • After that, only the owner or an admin can report under that name. Anything else gets a 403 error, and shows as Report refused under Activity.
  • Moving a token into a team moves the names it owns to that team on its next report.
  • To reassign a name, an admin opens the project or build, chooses a new owner under Owner, and selects Change owner. Whoever reports next frees the name for its rightful owner to claim.

A name nobody owns yet can be taken by anyone with a token, so report your important projects early. If a different token will report a name from now on, such as a rotated bot with a new name, reassign the name first. See CI.

Require a team to claim a name

Set access.claim_needs_team: true, or PRATIQUE_CLAIM_NEEDS_TEAM=true, to stop someone with no team from claiming a new project or build name. Their report is refused with a message that the name has no owner yet, that only a team can claim it, and that an admin can put their token in a team. Names that already have an owner aren't affected.