{"id":33937033,"url":"https://github.com/mechiru/google-authz","last_synced_at":"2026-04-10T10:02:37.411Z","repository":{"id":43798451,"uuid":"365542170","full_name":"mechiru/google-authz","owner":"mechiru","description":"google-authz = tower-service + google authentication","archived":false,"fork":false,"pushed_at":"2024-09-04T03:37:20.000Z","size":69,"stargazers_count":19,"open_issues_count":4,"forks_count":12,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-14T02:50:06.204Z","etag":null,"topics":["authentication","gce","gcp","gke","google"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mechiru.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-08T15:00:19.000Z","updated_at":"2025-05-30T19:01:16.000Z","dependencies_parsed_at":"2023-01-23T07:45:54.091Z","dependency_job_id":null,"html_url":"https://github.com/mechiru/google-authz","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/mechiru/google-authz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mechiru%2Fgoogle-authz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mechiru%2Fgoogle-authz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mechiru%2Fgoogle-authz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mechiru%2Fgoogle-authz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mechiru","download_url":"https://codeload.github.com/mechiru/google-authz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mechiru%2Fgoogle-authz/sbom","scorecard":{"id":633952,"data":{"date":"2025-08-11","repo":{"name":"github.com/mechiru/google-authz","commit":"eb1c7a50e6a2376ebf1d09569668129fab5fb339"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/pub.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/mechiru/google-authz/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/mechiru/google-authz/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pub.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/mechiru/google-authz/pub.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pub.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/mechiru/google-authz/pub.yml/master?enable=pin","Warn: containerImage not pinned by hash: examples/Dockerfile:4","Warn: containerImage not pinned by hash: examples/Dockerfile:9","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-21T08:36:17.181Z","repository_id":43798451,"created_at":"2025-08-21T08:36:17.181Z","updated_at":"2025-08-21T08:36:17.181Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31637748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","gce","gcp","gke","google"],"created_at":"2025-12-12T14:43:07.600Z","updated_at":"2026-04-10T10:02:37.405Z","avatar_url":"https://github.com/mechiru.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# google-authz\n\n[![ci](https://github.com/mechiru/google-authz/workflows/ci/badge.svg)](https://github.com/mechiru/google-authz/actions?query=workflow:ci)\n[![pub](https://github.com/mechiru/google-authz/workflows/pub/badge.svg)](https://github.com/mechiru/google-authz/actions?query=workflow:pub)\n[![doc](https://docs.rs/google-authz/badge.svg)](https://docs.rs/google-authz)\n[![version](https://img.shields.io/crates/v/google-authz.svg)](https://crates.io/crates/google-authz)\n\nThis library provides auto-renewed tokens for Google service authentication.\u003cbr\u003e\n**google-authz = tower-service + google authentication**\n\n## Notes\n\n| Authentication flow                  | Status    |\n|--------------------------------------|-----------|\n| API key                              | Supported |\n| OAuth 2.0 client                     | Supported |\n| Environment-provided service account | Supported |\n| Service account key                  | Supported |\n\n\n## Example\n\n### Default\n\n- Scope is `https://www.googleapis.com/auth/cloud-platform`\n- Looks for credentials in the following places, preferring the first location found:\n  - A JSON file whose path is specified by the `GOOGLE_APPLICATION_CREDENTIALS` environment variable.\n  - A JSON file in a location known to the gcloud command-line tool.\n  - On Google Compute Engine, it fetches credentials from the metadata server.\n\n```rust\nuse google_authz::{Credentials, GoogleAuthz};\n\nlet credentials = Credentials::builder().build().await.unwrap();\nlet service = GoogleAuthz::builder(service).credentials(credentials).build().await;\n\n// same as above\nlet service = GoogleAuthz::new(service).await;\n```\n\n\n\n### Custom\n\nno auth:\n```rust\nlet credentials = Credentials::builder().no_credentials().build().await.unwrap();\nlet service = GoogleAuthz::builder(service).credentials(credentials).build().await;\n```\n\napi key:\n```rust\nlet credentials = Credentials::builder().api_key(api_key).build().await.unwrap();\nlet service = GoogleAuthz::builder(service).credentials(credentials).build().await;\n```\n\njson:\n```rust\nlet credentials = Credentials::builder().json(json).build().await.unwrap();\nlet service = GoogleAuthz::builder(service).credentials(credentials).build().await;\n```\n\njson file:\n```rust\nlet credentials = Credentials::builder().json_file(json_file).build().await.unwrap();\nlet service = GoogleAuthz::builder(service).credentials(credentials).build().await;\n```\n\nmetadata:\n```rust\nlet credentials = Credentials::builder().metadata(None).build().await.unwrap();\nlet service = GoogleAuthz::builder(service).credentials(credentials).build().await;\n```\n\nscope:\n```rust\nlet credentials = Credentials::builder().scopes(scopes).build().await.unwrap();\nlet service = GoogleAuthz::builder(service).credentials(credentials).build().await;\n```\n\n\n### with [tonic](github.com/hyperium/tonic)\n\n**When using with tonic crate, please enable the `tonic` feature.**\n\n```rust\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    tracing_subscriber::fmt::init();\n\n    let project = env::args().nth(1).expect(\"cargo run --bin tonic -- \u003cGCP_PROJECT_ID\u003e\");\n    let channel = Channel::from_static(\"https://pubsub.googleapis.com\").connect().await?;\n    let channel = GoogleAuthz::new(channel).await;\n\n    let mut client = PublisherClient::new(channel);\n    let response = client\n        .list_topics(Request::new(ListTopicsRequest {\n            project: format!(\"projects/{}\", project),\n            page_size: 10,\n            ..Default::default()\n        }))\n        .await?;\n    println!(\"response = {:#?}\", response);\n\n    Ok(())\n}\n```\n\nThe complete code can be found [here](./examples/src/tonic.rs).\n\n\n\n## License\n\nLicensed under either of [Apache License, Version 2.0](./LICENSE-APACHE) or [MIT license](./LICENSE-MIT) at your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmechiru%2Fgoogle-authz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmechiru%2Fgoogle-authz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmechiru%2Fgoogle-authz/lists"}