{"id":15401133,"url":"https://github.com/sunfishcode/ambient-authority","last_synced_at":"2025-04-15T01:16:21.501Z","repository":{"id":47443762,"uuid":"356139682","full_name":"sunfishcode/ambient-authority","owner":"sunfishcode","description":"Ambient Authority","archived":false,"fork":false,"pushed_at":"2023-06-30T16:23:37.000Z","size":49,"stargazers_count":21,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T01:16:03.917Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sunfishcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-09T04:53:16.000Z","updated_at":"2025-03-29T04:34:20.000Z","dependencies_parsed_at":"2024-10-01T15:56:44.420Z","dependency_job_id":"960b741f-e482-4778-b8ca-8d900413654e","html_url":"https://github.com/sunfishcode/ambient-authority","commit_stats":{"total_commits":31,"total_committers":1,"mean_commits":31.0,"dds":0.0,"last_synced_commit":"d0d3c2d5c3fb00b027dfbd2e9041f686d7529775"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunfishcode%2Fambient-authority","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunfishcode%2Fambient-authority/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunfishcode%2Fambient-authority/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunfishcode%2Fambient-authority/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunfishcode","download_url":"https://codeload.github.com/sunfishcode/ambient-authority/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248986315,"owners_count":21194025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-01T15:56:34.842Z","updated_at":"2025-04-15T01:16:21.483Z","avatar_url":"https://github.com/sunfishcode.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\u003ccode\u003eambient-authority\u003c/code\u003e\u003c/h1\u003e\n\n  \u003cp\u003e\n    \u003cstrong\u003eAmbient Authority\u003c/strong\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"https://github.com/sunfishcode/ambient-authority/actions?query=workflow%3ACI\"\u003e\u003cimg src=\"https://github.com/sunfishcode/ambient-authority/workflows/CI/badge.svg\" alt=\"Github Actions CI Status\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/ambient-authority\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/ambient-authority.svg\" alt=\"crates.io page\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://docs.rs/ambient-authority\"\u003e\u003cimg src=\"https://docs.rs/ambient-authority/badge.svg\" alt=\"docs.rs docs\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\nIn capability-based security contexts, *ambient authority* means anything a\nprogram can do that interacts with the outside world that isn't represented by\na handle.\n\nThis crate defines an empty function, [`ambient_authority`], which returns a\nvalue of type [`AmbientAuthority`]. This is an empty type used in function\nsignatures to declare that they use ambient authority. When an API uses\n`AmbientAuthority` in all functions that use ambient authority, one can quickly\nlocate all the calls to such functions by scanning for calls to\n`ambient_authority`.\n\nTo use the `AmbientAuthroity` type in an API:\n\n - Add an [`AmbientAuthority`] argument at the end of the argument list of any\n   function that uses ambient authroity, and add a `# Ambient Authority`\n   section in the documentation comments for such functions explaining their\n   use of ambient authority.\n\n - Re-export the [`ambient_authority`] function and `AmbientAuthority` type\n   from this crate, so that users can easily use the same version.\n\n - Ensure that all other `pub` functions avoid using ambient authority,\n   including mutable static state such as static `Atomic`, `Cell`, `RefCell`,\n   `Mutex`, `RwLock`, or similar state, including `once_cell` or `lazy_static`\n   state with initialization that uses ambient authority.\n\nFor example, see the [cap-std] crate's API, which follows these guidelines.\n\nOne of the cool things about capability-oriented APIs is that programs don't\nneed to be pure to take advantage of them. That said, for programs which do\nwhich to aim for purity, this repository has a clippy configuration which can\nhelp. To use it:\n\n - Manually ensure that all immediate dependencies follow the above convention.\n\n - Copy the [clippy.toml] file into the top level source directory, add\n   `#![deny(clippy::disallowed_methods)]` to the root module (main.rs or\n   lib.rs), and run `cargo clippy` or equivalent.\n\n[cap-std]: https://docs.rs/cap-std/*/cap_std/\n[clippy.toml]: https://github.com/sunfishcode/ambient-authority/blob/main/clippy.toml\n[`AmbientAuthority`]: https://docs.rs/ambient-authority/latest/ambient_authority/struct.AmbientAuthority.html\n[`ambient_authority`]: https://docs.rs/ambient-authority/latest/ambient_authority/func.ambient_authority.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunfishcode%2Fambient-authority","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunfishcode%2Fambient-authority","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunfishcode%2Fambient-authority/lists"}