https://github.com/jku/ci-id
Ambient OIDC credential detection for CI systems
https://github.com/jku/ci-id
ci oidc rust
Last synced: 10 months ago
JSON representation
Ambient OIDC credential detection for CI systems
- Host: GitHub
- URL: https://github.com/jku/ci-id
- Owner: jku
- License: apache-2.0
- Created: 2024-10-25T16:26:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-12T13:09:56.000Z (11 months ago)
- Last Synced: 2025-08-12T15:11:23.066Z (11 months ago)
- Topics: ci, oidc, rust
- Language: Rust
- Homepage: https://docs.rs/ci-id
- Size: 270 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Ambient credentials detection for CI systems
[](https://github.com/jku/ci-id/actions/workflows/ci.yml)
`ci-id` is a small Rust library that provides easy access to ambient OIDC credentials in CI systems.
```rust
use ci_id::{detect_credentials, CIIDError};
fn main() -> Result<(), CIIDError> {
let token = detect_credentials(Some("myaudience"))?;
print!("Ambient OIDC token detected: {}", token);
Ok(())
}
```
See [ci-id-bin](https://crates.io/crates/ci-id-bin) crate for a simple CLI wrapper.
ci-id is based on [id](https://github.com/di/id), a similar Python project.
### Supported environments
Currently supported environments are:
* GitHub Actions
* GitLab CI/CD
* CircleCI
* Buildkite
See [documentation](https://docs.rs/ci-id/latest/ci_id/) for details on what configuration each of these environments needs.
### License
`ci-id` is licensed under the Apache 2.0 License.