Skip to content

Commit

Permalink
- Set default value for POLICY_BUNDLE_SERVER_AWS_REGION and remove …
Browse files Browse the repository at this point in the history
…redundant if statement.

- Fix duplicated value in documentation.
  • Loading branch information
kbalthaser committed Mar 21, 2024
1 parent 75cce6c commit 8dc364e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ You can configure how the OPAL-server will authenticate itself with the bundle s
| POLICY_BUNDLE_SERVER_TYPE | `HTTP` (authenticated with bearer token,or nothing), `AWS-S3`(Authenticated with [AWS REST Auth](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html) | AWS-S3 |
| POLICY_BUNDLE_SERVER_TOKEN_ID | The Secret Token Id (AKA user id, AKA access-key) sent to the API bundle server. | AKIAIOSFODNN7EXAMPLE |
| POLICY_BUNDLE_SERVER_TOKEN | The Secret Token (AKA password, AKA secret-key) sent to the API bundle server. | wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY |
| POLICY_BUNDLE_SERVER_TOKEN | The Secret Token (AKA password, AKA secret-key) sent to the API bundle server. | wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY |
| POLICY_BUNDLE_SERVER_AWS_REGION| The AWS Region if using `AWS-S3` Defaults to `us-east-1` | us-east-1 |

## <a name="compose-example"></a>Docker compose example
Expand Down
2 changes: 0 additions & 2 deletions packages/opal-common/opal_common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ def getSignatureKey(key, dateStamp, regionName, serviceName):
+ payload_hash
)

if not region:
region = "us-east-1"

algorithm = "AWS4-HMAC-SHA256"
credential_scope = datestamp + "/" + region + "/" + "s3" + "/" + "aws4_request"
Expand Down
2 changes: 1 addition & 1 deletion packages/opal-server/opal_server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class OpalServerConfig(Confi):
)
POLICY_BUNDLE_SERVER_AWS_REGION = confi.str(
"POLICY_BUNDLE_SERVER_AWS_REGION",
None,
"us-east-1",
description="The AWS region of the S3 bucket",
)
POLICY_BUNDLE_TMP_PATH = confi.str(
Expand Down

0 comments on commit 8dc364e

Please sign in to comment.