Skip to content

Commit

Permalink
Fix pre-commit code-format issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kbalthaser committed Mar 21, 2024
1 parent 8dc364e commit c175db2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ def build_auth_headers(self, token=None, path=None):
host = split_url.netloc
path = split_url.path + "/" + path

return build_aws_rest_auth_headers(self.token_id, token, host, path, self.region)
return build_aws_rest_auth_headers(
self.token_id, token, host, path, self.region
)
else:
return {}

Expand Down
5 changes: 3 additions & 2 deletions packages/opal-common/opal_common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def get_authorization_header(token: str) -> Tuple[str, str]:
return "Authorization", f"Bearer {token}"


def build_aws_rest_auth_headers(key_id: str, secret_key: str, host: str, path: str, region: str):
def build_aws_rest_auth_headers(
key_id: str, secret_key: str, host: str, path: str, region: str
):
"""Use the AWS signature algorithm (https://docs.aws.amazon.com/AmazonS3/la
test/userguide/RESTAuthentication.html) to generate the hTTP headers.
Expand Down Expand Up @@ -104,7 +106,6 @@ def getSignatureKey(key, dateStamp, regionName, serviceName):
+ payload_hash
)


algorithm = "AWS4-HMAC-SHA256"
credential_scope = datestamp + "/" + region + "/" + "s3" + "/" + "aws4_request"

Expand Down
2 changes: 1 addition & 1 deletion packages/opal-server/opal_server/policy/watcher/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def setup_watcher_task(
bundle_server_type=policy_bundle_server_type,
policy_bundle_path=opal_server_config.POLICY_BUNDLE_TMP_PATH,
policy_bundle_git_add_pattern=opal_server_config.POLICY_BUNDLE_GIT_ADD_PATTERN,
region=policy_bundle_aws_region
region=policy_bundle_aws_region,
)
else:
raise ValueError("Unknown value for OPAL_POLICY_SOURCE_TYPE")
Expand Down

0 comments on commit c175db2

Please sign in to comment.