OpenCHAMI / bss

MIT License
1 stars 2 forks source link

Changed how BSS fetches a new token #26

Closed davidallendj closed 6 months ago

davidallendj commented 6 months ago

This PR changes how BSS fetches an access token. It adds a single FetchAccessToken function that is used in place of the functions used to perform a client credentials grant. It also changes the loadPublicKeyFromURL function to fetchPublicKey and moves it to the oauth.go file.

synackd commented 6 months ago

We should also change the default OAUTH2 URLs to point to OPAAL for now instead of hydra.

diff --git a/cmd/boot-script-service/main.go b/cmd/boot-script-service/main.go
index 7dc23f7..177f0d7 100644
--- a/cmd/boot-script-service/main.go
+++ b/cmd/boot-script-service/main.go
@@ -102,8 +102,8 @@ var (
        jwksURL             = ""
        sqlDbOpts           = ""
        spireServiceURL     = "https://spire-tokens.spire:54440"
-       oauth2AdminBaseURL  = "http://127.0.0.1:4445"
-       oauth2PublicBaseURL = "http://127.0.0.1:4444"
+       oauth2AdminBaseURL  = "http://127.0.0.1:3333"
+       oauth2PublicBaseURL = "http://127.0.0.1:3333"
 )
synackd commented 6 months ago

LGTM!