Add --group-id flag to assume a group during OAuth login#5822
Add --group-id flag to assume a group during OAuth login#5822grundprinzip wants to merge 1 commit into
Conversation
Wire the SDK's u2m.WithAssumeGroup option into `databricks auth login` so users can assume a Databricks group during the U2M OAuth flow. When set, the numeric group ID is sent as the `assume_group` query parameter on the authorize request and the minted token is scoped to that group. Changes: - Add a `--group-id` flag to `auth login`. The value follows the same precedence as `--scopes`: an explicit flag wins, otherwise re-login preserves the group ID from the existing profile. - Wire WithAssumeGroup into both the standard and discovery login flows and persist the group ID to the profile as `group_id`. - Add `AssumeGroupID` to the profile struct and its file parsing so re-login can read the previously configured group ID back. - Skip `group_id` in the env loader's always-skip list so it comes from the selected profile only, consistent with other auth-steering fields. Co-authored-by: Isaac Signed-off-by: Martin Grund <martin.grund@databricks.com>
|
An authorized user can trigger integration tests manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
Approval status: pending
|
Why
Wire the SDK's u2m.WithAssumeGroup option into
databricks auth loginso users can assume a Databricks group during the U2M OAuth flow. When set, the numeric group ID is sent as theassume_groupquery parameter on the authorize request and the minted token is scoped to that group.Changes
--group-idflag toauth login. The value follows the same precedence as--scopes: an explicit flag wins, otherwise re-login preserves the group ID from the existing profile.group_id.AssumeGroupIDto the profile struct and its file parsing so re-login can read the previously configured group ID back.group_idin the env loader's always-skip list so it comes from the selected profile only, consistent with other auth-steering fields.Co-authored-by: Isaac