Create scope in Authorize

Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-05-20 18:11:25 -07:00
parent 7f59a0d2ee
commit 4d1a98ffdb
45 changed files with 1480 additions and 1754 deletions

View File

@@ -72,18 +72,18 @@ func handleConnectorInitiate(
return
}
if err := iamSvc.Authorizer.Authorize(r.Context(), iam.AuthorizeParams{
scope, err := iamSvc.Authorizer.Authorize(r.Context(), iam.AuthorizeParams{
Principal: identity.ID,
Resource: organizationID,
Session: &session.ID,
Action: probo.ActionConnectorInitiate,
}); err != nil {
})
if err != nil {
httpserver.RenderError(w, http.StatusForbidden, err)
return
}
requestedScopes := r.URL.Query()["scope"]
scope := coredata.NewScopeFromObjectID(organizationID)
prb := proboSvc
// Look up any existing connector so we can union its stored scopes