ci-id

Crates.ioci-id
lib.rsci-id
version
sourcesrc
created_at2024-10-29 16:14:53.637841
updated_at2024-12-03 11:15:01.881333
descriptionAmbient OIDC credentials detection on CI systems
homepage
repositoryhttps://github.com/jku/ci-id
max_upload_size
id1427184
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Jussi Kukkonen (jku)

documentation

README

Ambient credentials detection for CI systems

CI badge

ci-id provides easy access to ambient OIDC credentials in CI systems.

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 crate for a simple CLI wrapper.

ci-id is based on id, a similar Python project.

Supported environments

Currently supported environments are:

  • GitHub Actions
  • GitLab CI/CD
  • CircleCI
  • Buildkite

See documentation for details on what configuration each of these environments needs.

License

ci-id is licensed under the Apache 2.0 License.

Commit count: 67

cargo fmt