Skip to content

v1.1.0

Choose a tag to compare

@github-actions github-actions released this 26 Sep 05:21
· 38 commits to main since this release
Immutable release. Only release title and notes can be modified.
dd7114d

Added

  • go install github.com/bgs113/azpim@latest now works: the module path is github.com/bgs113/azpim (was azpim), so the Go module proxy and pkg.go.dev can find it (#34). Binaries built this way report their module version in azpim version.
  • activate, deactivate and extend print the identity they act as (Acting as alice@contoso.com (tenant …), or service principal <appid>) to stderr before changing anything, so a service-principal secret left in AZURE_CLIENT_ID/AZURE_CLIENT_SECRET can't elevate unnoticed. JSON on stdout is unchanged (#29).
  • --cloud public|usgov|china (or AZURE_CLOUD) targets Azure US Government or Azure China instead of the public cloud. Sign-in, the ARM endpoint and the token scope all follow the chosen cloud (#25).
  • --dry-run and --validate-only on activate, deactivate and extend. --dry-run shows what would be sent and sends nothing. --validate-only has Azure check the request against the role policy without creating it, and exits non-zero with Azure's reason if it fails. JSON output reports "status": "DryRun" or "Validated" (#26).
  • activate --start schedules an activation for a later time, e.g. a maintenance window: --start 22:00 (today, or tomorrow if that time has passed), --start 2026-10-01T22:00 (local time), or RFC 3339. azpim requests shows such a request as Scheduled until it starts, and its JSON has a new starts_at field (#28).
  • --management-group (-m) accepts a management group's display name as well as its ID, e.g. -m "Production". Names are looked up among the management groups where you have an eligible or active assignment, so no extra permission is needed. An ID still costs no extra API calls, and an unknown or ambiguous name gives an error that lists the candidates and their IDs (#31).

Changed

  • --subscription no longer defaults to the AZURE_SUBSCRIPTION_ID environment variable. When it was set (often by azd or a deployment script), commands run without scope flags quietly looked at only that subscription, and deactivate --all left roles in other subscriptions active. Commands without scope flags now always cover the whole tenant. To keep the old behaviour, pass -s "$AZURE_SUBSCRIPTION_ID".
  • JSON output of activate, extend and deactivate: status now uses the same values as azpim requests (Active, Pending, …), and a new azure_status field carries Azure's raw status. activate's pending value changes from PendingApproval to Pending. The time fields (activated_at, extended_at, deactivated_at, expires_at) are omitted until Azure confirms the change; requested_at is always set.
  • With no scope flags, eligible, active, requests, activate, deactivate and extend now list assignments with one tenant-wide query instead of querying every subscription and management group separately. This is faster in large tenants and avoids ARM throttling. Role and scope names now come from the same response, so azpim no longer makes extra lookups for them (#23).
  • requests now lists requests that target you (asTarget()) instead of requests you submitted (asRequestor()), which Azure rejects at the tenant root. For self-activation the results are the same. Requests an admin made on your behalf now appear too.

Fixed

  • extend no longer prints ✓ extended when Azure only queued the request for approval: it says the request is pending and not in effect yet (#32). activate and deactivate now check Azure's status the same way. activate treated PendingAdminDecision and some other pending statuses as success, and deactivate never checked the status at all. Denied, failed and timed-out requests are reported as errors.
  • The interactive picker in extend said "Select active role to deactivate"; it now says "to extend".
  • RoleAssignmentDoesNotExist errors, which Azure returns when you deactivate or extend a role within about 5 minutes of activating it, now explain that and suggest waiting.
  • PendingRoleAssignmentRequest errors now say a request for the role is already pending, and point to azpim requests --pending.
  • The MEMBERSHIP column (membership_type in JSON) now shows Azure's value as-is. Before, anything other than Group was shown as Direct, so an assignment inherited from a parent scope (Inherited) looked like a direct assignment.
  • active --include-permanent no longer hides a permanent assignment when you also have a group-based assignment for the same role and scope. Only the shadow Direct copies that Azure creates for group members are hidden now.
  • A subscription or management group that failed to list is no longer dropped silently. There is now a single query, so a failure is reported as an error.

Removed

  • The on-disk caches ~/.cache/azpim/scopes.json and ~/.cache/azpim/roledefs.json. azpim no longer writes to ~/.cache/azpim/, and the directory can be deleted. The Docker examples no longer mount it.