Skip to content

Add local file-based access-control rule support.#329

Merged
ZhidongPeng merged 13 commits intoAzure:devfrom
ZhidongPeng:dev
Apr 27, 2026
Merged

Add local file-based access-control rule support.#329
ZhidongPeng merged 13 commits intoAzure:devfrom
ZhidongPeng:dev

Conversation

@ZhidongPeng
Copy link
Copy Markdown
Collaborator

  • Added base64 = "0.22" dependency
  • Introduces a new local_rules module that

parses base64-encoded rule-id descriptors,
merges host-delivered and customer-managed rules with fail-closed behavior on parse errors,
tracks file state across polls, and integrates with key_keeper

  • Added rules_dir: PathBuf field to KeyKeeper struct and refactored update_access_control_rules() to accept state tracker, call resolve_effective_rules() for WireServer/IMDS/HostGA, and handle local-rule-merged effective rules

Copy link
Copy Markdown
Collaborator Author

@ZhidongPeng ZhidongPeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review ??? Add local file-based access-control rule support

Thanks for the PR. Overall the design is clean: base64-encoded rule-id descriptors, fail-closed on parse errors, and file-state tracking across polls are all solid patterns.

Below are inline comments ranging from a potential behavioral regression to minor nits. Please take a look.

Comment thread proxy_agent/src/key_keeper.rs Outdated
Comment thread proxy_agent/src/key_keeper/local_rules.rs Outdated
Comment thread proxy_agent/src/key_keeper/local_rules.rs
Comment thread proxy_agent/src/key_keeper/local_rules.rs Outdated
Comment thread proxy_agent/src/key_keeper/local_rules.rs
Comment thread proxy_agent/src/key_keeper/local_rules.rs Outdated
Comment thread proxy_agent/src/key_keeper.rs
@ZhidongPeng ZhidongPeng merged commit c259110 into Azure:dev Apr 27, 2026
12 checks passed
ZhidongPeng added a commit that referenced this pull request Apr 27, 2026
* Report eBPF service statuses instead of checking installation (#334)

* Report eBPF service statuses instead of checking installation

---------

Co-authored-by: Srikrishna Veturi <sveturi@microsoft.com>

* Fix clippy::unnecessary_sort_by (#336)

* Bump rand from 0.8.5 to 0.8.6 (#339)

Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.8.6.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/0.8.6/CHANGELOG.md)
- [Commits](rust-random/rand@0.8.5...0.8.6)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.8.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump openssl from 0.10.73 to 0.10.78 (#338)

Bumps [openssl](https://github.com/rust-openssl/rust-openssl) from 0.10.73 to 0.10.78.
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases)
- [Commits](rust-openssl/rust-openssl@openssl-v0.10.73...openssl-v0.10.78)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.78
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zhidong Peng <zpeng@microsoft.com>

* GPA service to use host-date-time for signed http requests (#335)

* GPA service to use host-date-time for signed http requests

* add logging

* fix typo

* Bump rand from 0.8.5 to 0.8.6 (#339)

Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.8.6.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/0.8.6/CHANGELOG.md)
- [Commits](rust-random/rand@0.8.5...0.8.6)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.8.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump openssl from 0.10.73 to 0.10.78 (#338)

Bumps [openssl](https://github.com/rust-openssl/rust-openssl) from 0.10.73 to 0.10.78.
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases)
- [Commits](rust-openssl/rust-openssl@openssl-v0.10.73...openssl-v0.10.78)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.78
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zhidong Peng <zpeng@microsoft.com>

* resolve comments

Co-authored-by: Copilot <copilot@github.com>

* fix spelling

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zhidong Peng <zpeng@micrsoft.com>
Co-authored-by: Copilot <copilot@github.com>

* Add local file-based access-control rule support. (#329)

* Add local file-based access-control rule support.

* formatting

* resolve comments and validate the parsed local rules.

* fix formatting.

* fix case-insensitive match

* prefix_local_rule_names

Co-authored-by: Copilot <copilot@github.com>

* Display useLocalFileRules.

* update log level at attemptting

Co-authored-by: Copilot <copilot@github.com>

* fix formatting

---------

Co-authored-by: Zhidong Peng <zpeng@micrsoft.com>
Co-authored-by: Copilot <copilot@github.com>

* cmdline to take the first 4 arguments  (#340)

* cmdline to take the first 4 arguments
* fix in common code path

* Update version to 1.0.43

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Srikrishna Veturi <veturi.srikrishna@gmail.com>
Co-authored-by: Srikrishna Veturi <sveturi@microsoft.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zhidong Peng <zpeng@micrsoft.com>
Co-authored-by: Copilot <copilot@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants