Releases: rokwire/core-auth-library-go
v3.2.0
v3.1.0
v3.0.1
[3.0.1] - 2023-03-16
Fixed
- Mismatching token signing algorithms do not trigger service reg refresh #88
Full Changelog: https://github.com/rokwire/core-auth-library-go/blob/main/CHANGELOG.md
Migration steps
Follow the steps below to upgrade to the associated version of this library. Note that the steps for each version are cumulative, so if you are attempting to upgrade by several versions, be sure to make the changes described for each version between your current version and the latest.
3.0.1
Breaking changes
handlers
- All
tokenauth.Handler
types are now expected to be pointers.
authservice
NewServiceRegManager
now takes avalidate bool
argument that determines whether or not the service registration for the caller should be automatically validated.
v3.0.0
[3.0.0] - 2023-03-09
Added
- BREAKING: Encapsulate key management #76
- BREAKING: Add webauth package for web apps #83
- Claims can access resource function #85
Full Changelog: https://github.com/rokwire/core-auth-library-go/blob/main/CHANGELOG.md
Migration steps
Follow the steps below to upgrade to the associated version of this library. Note that the steps for each version are cumulative, so if you are attempting to upgrade by several versions, be sure to make the changes described for each version between your current version and the latest.
3.0.0
Breaking changes
authservice
ServiceRegManager.ValidateServiceRegistrationKey
now takes a*keys.PrivKey
as an argument instead of*rsa.PrivateKey
.PubKey
has been moved into the newkeys
package.
authutils
GetKeyFingerprint
has been removed and now exists asSetKeyFingerprint
as a function onkeys.PubKey
.GetPubKeyPem
has been removed and now exists asEncode
as a function onkeys.PubKey
.
sigauth
SignatureAuth.CheckSignature
now takes a*keys.PubKey
as an argument instead of*rsa.PublicKey
.SignatureAuth.CheckRequestSignature
now takes a*keys.PubKey
as an argument instead of*rsa.PublicKey
.GetRequestDigest
now takes analg string
argument to specify which hash algorithm to use to compute the digest- The
SignatureAuthHeader
algorithm check has been removed fromCheckRequest
, which has also been renamed toParseRequestSignature
. This better reflects that the function should be used to parse HTTP requests. The algorithm check has been moved toCheckParsedRequestSignature
.
tokenauth
TokenAuth.ValidateCsrfTokenClaims
has been removed, as the tokenauth package is no longer used to handle CSRF tokens, and these tokens are now opaque.TokenAuth.GetRequestTokens
has been renamed toTokenAuth.GetAccessToken
and now only returns an access token found in theAuthorization
header of a request.TokenAuth.CheckRequestTokens
has been renamed toTokenAuth.CheckRequestToken
because now only the access token is checked.
v2.2.0
v2.1.0
v2.0.3
v2.0.2
v2.0.1
BREAKING
This release includes breaking changes. Please see the "Migration steps' below for instructions on upgrading to this version.
[2.0.1] - 2022-06-15
Changed
- Update documentation #62
- BREAKING: Service ID used as key ID in signatures #49
- BREAKING: Handle service account access tokens #35
- BREAKING: Add description to permission authorization policy model #57
- Update documentation to reflect process for breaking changes and deprecations #54
- BREAKING: Split AuthDataLoader interface #36
Added
- Add service account unit tests #59
Migration steps
Follow the steps below to upgrade to the associated version of this library. Note that the steps for each version are cumulative, so if you are attempting to upgrade by several versions, be sure to make the changes described for each version between your current version and the latest.
v2.0.0
Breaking changes
authservice
- The
AuthDataLoader
interface has been removed and theAuthService
type has been refactored to contain basic configuration data needed to communicate with the ROKWIRE Auth Service. - The
ServiceRegManager
type has been added. To create aServiceRegManager
, aServiceRegLoader
must be created. TheServiceRegLoader
is used to load service registration records retrieved from the ROKWIRE Auth Service, which are managed by theServiceRegManager
. - The
ServiceAccountManager
andServiceAccountLoader
types have been added. To create aServiceAccountManager
, aServiceAccountLoader
must be created. TheServiceAccountLoader
is used to load access tokens from the ROKWIRE Auth Service, where the implementing service must hold an account. These access tokens are managed by theServiceAccountManager
. - The
Kid
field inPubKey
is now calledKeyID
.
See above for an example of how to create instances of these types to interact with a remote ROKWIRE Auth Service.
coreservice
- The
coreservice
package has been added. It declares theCoreService
type, which is used to interface with services on the Core Building Block. - All deleted account-related functionality previously used by the
AuthDataLoader
interface has been moved to thecoreservice
package.
sigauth
- The
KeyId
field inSignatureAuthHeader
is now calledKeyID
, and it contains the SHA256 fingerprint of the signing service's public key instead of the signing service ID. - Signed requests reflect this change, and checking signed requests requires the
KeyID
matches the public key fingerprint of a provided list of service registrations.
String Casbin Authorization Policy Model
A "description" (descr
) parameter has been added to the Casbin string authorization policy model. This allows a description of each permission to be provided inline within the authorization policies. This change means that all Casbin string authorization policies (eg. permission policies) must be updated to include an additional column for this description.
See example/token/permissions_authorization_policy.csv for an example of the new policy format.
Note: While this new column must exist, it will not impact the actual authorization policy and may be left empty if appropriate.
Full Changelog: https://github.com/rokwire/core-auth-library-go/blob/main/CHANGELOG.md