Check Out and Check In
Overview
Checkout is the core workflow in PyBritive. When you check out a profile, Britive grants your identity temporary credentials to a cloud account or resource. When you are done, you check in to revoke that access — no standing privileges remain.
What you’ll learn:
- How to check out a profile and retrieve temporary credentials
- How to view credentials in different formats
- How to create an alias for a profile you use frequently
- How to extend an active checkout
- How to check in a profile when you are done
Before You Begin
- PyBritive installed and authenticated — see Getting Started
- At least one profile available for checkout — see Listing Your Access
Note: Profile names in this tutorial are from the Britive demo tenant. Replace them with your own profile names from
pybritive ls profiles.
Check Out and Check In a Profile
Check out a profile
Use the profile name returned by pybritive ls profiles. Profile names follow the format Application Name/Environment Name/Profile Name.
pybritive checkout "AWS SE Organization/696226360299 (se-demo)/S3 Bucket Admin"By default, PyBritive prints the temporary credentials to your terminal. Keep the profile name in quotes to handle spaces correctly.
View credentials in different formats
Use the --mode flag to control how credentials are returned.
Environment variables (Linux/macOS):
pybritive checkout "AWS SE Organization/696226360299 (se-demo)/S3 Bucket Admin" --mode envThis outputs export statements you can evaluate directly in your shell:
eval $(pybritive checkout "AWS SE Organization/696226360299 (se-demo)/S3 Bucket Admin" --mode env)Environment variables (Windows Command Prompt):
pybritive checkout "AWS SE Organization/696226360299 (se-demo)/S3 Bucket Admin" --mode env-wincmdEnvironment variables (Windows PowerShell):
pybritive checkout "AWS SE Organization/696226360299 (se-demo)/S3 Bucket Admin" --mode env-winpsJSON:
pybritive checkout "AWS SE Organization/696226360299 (se-demo)/S3 Bucket Admin" --mode jsonCreate a profile alias
If you check out the same profile regularly, create an alias so you don’t have to type the full profile name each time.
pybritive checkout "AWS SE Organization/696226360299 (se-demo)/S3 Bucket Admin" --alias s3-adminFuture checkouts can use the alias instead of the full profile path:
pybritive checkout s3-adminExtend an active checkout
If your session is approaching expiry and you need more time, extend it without checking in and back out:
pybritive checkout "AWS SE Organization/696226360299 (se-demo)/S3 Bucket Admin" --extendCheck out a profile that requires approval
Some profiles require manager or admin approval before credentials are issued. When you check out one of these profiles, PyBritive waits and polls for approval automatically.
Provide a justification when prompted, or pass it directly with the --justification flag:
pybritive checkout "Sigma Prod/724271230776/Prod Admin" --justification "Investigating production incident #1234"PyBritive will wait up to 10 minutes by default for approval. You can adjust the maximum wait time:
pybritive checkout "Sigma Prod/724271230776/Prod Admin" \
--justification "Investigating production incident #1234" \
--maxpolltime 300If you do not want the command to block, use pybritive request submit instead — covered in Approval Workflows.
Check in a profile
When you are done, check in to revoke your temporary credentials:
pybritive checkin "AWS SE Organization/696226360299 (se-demo)/S3 Bucket Admin"Or using an alias:
pybritive checkin s3-adminTo confirm the profile has been checked in, run:
pybritive ls profiles --checked-outThe profile should no longer appear in the list.
Troubleshoot
| Symptom | Cause | Fix |
|---|---|---|
Profile not found | Profile name typo or wrong format | Run pybritive ls profiles and copy the exact name |
| Checkout hangs indefinitely | Profile requires approval, approver not responding | Press Ctrl+C to cancel; contact your approver |
Already checked out | Profile is still active | Run pybritive checkin first, then checkout again |
| Credentials expired immediately | Clock skew between machine and Britive | Sync your system clock |
Next Steps
- AWS Credentials — use checkout modes specific to AWS, including
credential_processand console access - GCP Credentials — authenticate to GCP using
gcloudauthandgcloudauthexecmodes - Approval Workflows — submit, approve, and reject access requests without blocking your terminal