diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0b1463a..b4e666d 100755 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,14 @@ Change Log All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== + 5.3.5 - 2022-08-09 +==================== + +Fixed +_____ + +* Cloud only. Fixed references to the OCI "auth" package from iam.py that could lead to the error, "name 'auth' is not defined." ==================== 5.3.4 - 2022-06-13 diff --git a/src/borneo/iam/iam.py b/src/borneo/iam/iam.py index 5e515f1..4e1ffd9 100644 --- a/src/borneo/iam/iam.py +++ b/src/borneo/iam/iam.py @@ -14,6 +14,9 @@ try: from oci.signer import Signer from oci.auth.signers import SecurityTokenSigner + from oci.auth.signers import EphemeralResourcePrincipalSigner + from oci.auth.signers import InstancePrincipalsSecurityTokenSigner + from oci.auth.signers import get_resource_principals_signer from oci.config import from_file oci = 'yes' except ImportError: @@ -255,7 +258,7 @@ def get_resource_principal_claim(self, key): :rtype: str """ if not isinstance(self._provider, - auth.signers.EphemeralResourcePrincipalSigner): + EphemeralResourcePrincipalSigner): raise IllegalArgumentException( 'Only ephemeral resource principal support.') return self._provider.get_claim(key) @@ -330,9 +333,9 @@ def create_with_instance_principal(iam_auth_uri=None, region=None, """ SignatureProvider._check_oci() if iam_auth_uri is None: - provider = auth.signers.InstancePrincipalsSecurityTokenSigner() + provider = InstancePrincipalsSecurityTokenSigner() else: - provider = auth.signers.InstancePrincipalsSecurityTokenSigner( + provider = InstancePrincipalsSecurityTokenSigner( federation_endpoint=iam_auth_uri) if region is not None: provider.region = region.get_region_id() @@ -366,7 +369,7 @@ def create_with_resource_principal(logger=None): """ SignatureProvider._check_oci() signature_provider = SignatureProvider( - auth.signers.get_resource_principals_signer()) + get_resource_principals_signer()) return (signature_provider if logger is None else signature_provider.set_logger(logger)) @@ -410,10 +413,10 @@ def _refresh_task(self): # refresh security token before create new signature if (isinstance( self._provider, - auth.signers.InstancePrincipalsSecurityTokenSigner) or + InstancePrincipalsSecurityTokenSigner) or isinstance( self._provider, - auth.signers.EphemeralResourcePrincipalSigner)): + EphemeralResourcePrincipalSigner)): self._provider.refresh_security_token() self.get_signature_details_internal() diff --git a/src/borneo/version.py b/src/borneo/version.py index 473ecc8..a024be7 100644 --- a/src/borneo/version.py +++ b/src/borneo/version.py @@ -5,4 +5,4 @@ # https://oss.oracle.com/licenses/upl/ # -__version__ = '5.3.4' +__version__ = '5.3.5'