canonical / canonical/authd

Feature: Store directory extension attributes of groups in token.json

Open
#963 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
308
Forks
41
Avg merge
2d 4h
Merged PRs (30d)
58

Description

There are use cases to assign additional data to users and groups which should be accessible to admins of the local system. For example, @ajm370 wants to have shared user and group IDs on all systems using authd, and wants to achieve that by setting IDs via directory extensions, then read those once the user logged in and use authctl to change the user/group ID to the one from the directory extension (once authctl supports that). See https://github.com/ubuntu/authd/issues/630#issuecomment-2930695596 and the discussion following that comment.

The directory extension attributes of user objects can already be stored in the token.json file, by emitting them as claims in the ID token (which is stored in JWT format in the RawIDToken field of token.json): https://learn.microsoft.com/en-us/entra/identity-platform/schema-extensions

Directory extension attributes of groups are part of the group object which we already fetch via the Microsoft Graph API. A small patch is necessary to also store those in the token.json.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how user directory extension attributes are emitted as claims in the ID token and stored in token.json. Then inspect the existing Microsoft Graph group-object fetch path and determine where its extension attributes should be preserved alongside the RawIDToken data. Done means group directory extensions are available from token.json, with the relevant tests updated or added if the existing flow has coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authentication
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.