-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Adding host client certificate support to `cached_acl_provider.py` to support host certificates other than the managed host This will allow client certificates with a `host:/<hostname>` Subject Common Name to be referenced in `/etc/aclcache.json.gz` and `acl_config.py` (for example, to allow cert-authenticated requests from other hosts in the same rack as the wedge RSW). Test Plan: Unit tests (`./tests2/ptest-runner rest-api`), setup `acl_config.py` and `aclcache.json.gz` files to allow a test certificate with Subject CN `host:a_hostname.facebook.com` to do `POST /redfish/v1/Chassis/Rack/Actions/Chassis.Reset`: ``` echo ' RULES = {"/redfish/v1/Chassis/Rack/Actions/Chassis.Reset": {"POST": ["MANAGED_HOST_ANY", "POST:redfish_rack_actions_chassis_reset"]}} RULES_REGEXP = {} ' > /usr/local/fbpackages/rest-api/acl_config.py echo '{"host:a_hostname.facebook.com": ["POST:redfish_rack_actions_chassis_reset"]}' | gzip > /etc/aclcache.json.gz sv restart restapi ``` Run curl command, ensure it succeeds: ``` curl -f -v -k --cert client-cert.pem --key client-key.pem -X POST "https://$TARGET_BMC/redfish/v1/Chassis/Rack/Actions/Chassis.Reset" -d '{"ResetType": "ForceOff"}' ``` Reviewed By: alandau Differential Revision: D68328510 fbshipit-source-id: 7d1924cc1e3ec8938114eda0954ac816b302df75
- Loading branch information
1 parent
32690e0
commit b205a61
Showing
4 changed files
with
50 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters