diff --git a/go.mod b/go.mod index 367c6d4fe..b67da0887 100644 --- a/go.mod +++ b/go.mod @@ -54,7 +54,7 @@ require ( github.com/kovidgoyal/imaging v1.6.3 github.com/leonelquinteros/gotext v1.7.0 github.com/libregraph/idm v0.5.0 - github.com/libregraph/lico v0.64.0 + github.com/libregraph/lico v0.65.0 github.com/mitchellh/mapstructure v1.5.0 github.com/mna/pigeon v1.3.0 github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 diff --git a/go.sum b/go.sum index b3de4f246..7d7e157f5 100644 --- a/go.sum +++ b/go.sum @@ -255,8 +255,6 @@ github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c= github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME= github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1 h1:RU6LT6mkD16xZs011+8foU7T3LrPvTTSWeTQ9OgfhkA= github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1/go.mod h1:DedpcqXl193qF/08Y04IO0PpxyyMu8+GrkD6kWK2MEQ= -github.com/cs3org/reva/v2 v2.26.7 h1:E5b1+H5ZsnmDgWWS/u3t4PtdmiMaY1bEEYVI/vE9xo8= -github.com/cs3org/reva/v2 v2.26.7/go.mod h1:xC5N2XOrCRim/W55uyMsew8RwwFZbQ4hIaKshIbyToo= github.com/cs3org/reva/v2 v2.26.8-0.20241203081301-17f339546533 h1:QshDjljk44ASolJwlHxE9e7u+Slgdi/VfPKYvbfFu2g= github.com/cs3org/reva/v2 v2.26.8-0.20241203081301-17f339546533/go.mod h1:fJWmn7EkttWOWphZfiKdFOcHuthcUsU55aSN1VeTOhU= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= @@ -738,8 +736,8 @@ github.com/leonelquinteros/gotext v1.7.0 h1:jcJmF4AXqyamP7vuw2MMIKs+O3jAEmvrc5JQ github.com/leonelquinteros/gotext v1.7.0/go.mod h1:qJdoQuERPpccw7L70uoU+K/BvTfRBHYsisCQyFLXyvw= github.com/libregraph/idm v0.5.0 h1:tDMwKbAOZzdeDYMxVlY5PbSqRKO7dbAW9KT42A51WSk= github.com/libregraph/idm v0.5.0/go.mod h1:BGMwIQ/6orJSPVzJ1x6kgG2JyG9GY05YFmbsnaD80k0= -github.com/libregraph/lico v0.64.0 h1:fbMV2ALjrOysGL0m58bhRrF+9e/HCL5RkoSwMN+xoWQ= -github.com/libregraph/lico v0.64.0/go.mod h1:J2ZNe1DcO+K/5ptOOrQk2A2mn6OwXRdGUI4ASgw2WGg= +github.com/libregraph/lico v0.65.0 h1:h8GYJhTOBuNvxQzdViHdWkNSUp+YbPB1H18Bfn/zdlY= +github.com/libregraph/lico v0.65.0/go.mod h1:6w+kgoTYiXpJ7VriAaKJfeyF0eV/Stapd9pnK64du84= github.com/libregraph/oidc-go v1.1.0 h1:RyudjL3UyQblqeBQI06W53PniWobqODeeyAy6v/HumA= github.com/libregraph/oidc-go v1.1.0/go.mod h1:qW9ubcXvZrfbbWZBaLMuk7bt5qAUMYyt9/NtXQt07Cw= github.com/linode/linodego v0.25.3/go.mod h1:GSBKPpjoQfxEfryoCRcgkuUOCuVtGHWhzI8OMdycNTE= diff --git a/vendor/github.com/libregraph/lico/CHANGELOG.md b/vendor/github.com/libregraph/lico/CHANGELOG.md index 4e998708a..68cd669c9 100644 --- a/vendor/github.com/libregraph/lico/CHANGELOG.md +++ b/vendor/github.com/libregraph/lico/CHANGELOG.md @@ -4,7 +4,21 @@ -## v0.64.0 (2024-09-18) +## v0.65.0 (2024-11-26) + +- Add login hint support +- Add legacy support via plugin +- Allow client redirect URI with only a scheme +- Bump braces from 3.0.2 to 3.0.3 in /identifier +- Bump path-to-regexp from 1.8.0 to 1.9.0 in /identifier +- Bump ws from 8.14.2 to 8.17.1 in /identifier +- Bump rollup from 2.79.1 to 2.79.2 in /identifier +- Bump github.com/golang-jwt/jwt/v4 from 4.5.0 to 4.5.1 +- Keep extra backend provided id and access token claims on refresh +- Return id token when grant type is refresh token + + +## v0.64.0 (2024-09-19) - Implement refresh and revoke for lg identifier backend session - Pass real src ip and user agent to lg identifier backend diff --git a/vendor/github.com/libregraph/lico/identifier/api.go b/vendor/github.com/libregraph/lico/identifier/api.go index 1be19fc67..ea553dedf 100644 --- a/vendor/github.com/libregraph/lico/identifier/api.go +++ b/vendor/github.com/libregraph/lico/identifier/api.go @@ -35,10 +35,10 @@ func (i *Identifier) writeWebappIndexHTML(rw http.ResponseWriter, req *http.Requ // FIXME(longsleep): Set a secure CSP. Right now we need `data:` for images // since it is used. Since `data:` URLs possibly could allow xss, a better // way should be found for our early loading inline SVG stuff. - rw.Header().Set("Content-Security-Policy", fmt.Sprintf("default-src 'self'; img-src 'self' data:; font-src 'self' data:; script-src 'self'; style-src 'self' 'nonce-%s'; base-uri 'none'; frame-ancestors 'none';", nonce)) + rw.Header().Set("Content-Security-Policy", fmt.Sprintf("default-src 'self'; img-src 'self' data:; font-src 'self' data:; script-src 'self' 'nonce-%s'; style-src 'self' 'nonce-%s'; base-uri 'none'; frame-ancestors 'none';", nonce, nonce)) // Write index with random nonce to response. - index := bytes.Replace(i.webappIndexHTML, []byte("__CSP_NONCE__"), []byte(nonce), 1) + index := bytes.ReplaceAll(i.webappIndexHTML, []byte("__CSP_NONCE__"), []byte(nonce)) rw.Write(index) } diff --git a/vendor/github.com/libregraph/lico/identifier/package.json b/vendor/github.com/libregraph/lico/identifier/package.json index 8f72418e3..7400e18a6 100644 --- a/vendor/github.com/libregraph/lico/identifier/package.json +++ b/vendor/github.com/libregraph/lico/identifier/package.json @@ -25,6 +25,7 @@ "redux-logger": "^3.0.6", "redux-thunk": "^2.4.2", "render-if": "^0.1.1", + "validator": "^13.12.0", "web-vitals": "^1.1.2" }, "scripts": { @@ -47,9 +48,11 @@ "@types/react-dom": "^17.0.23", "@types/react-redux": "^7.1.25", "@types/redux-logger": "^3.0.12", + "@types/validator": "^13", "@typescript-eslint/eslint-plugin": "^6.11.0", "@typescript-eslint/parser": "^6.9.0", "@typescript-eslint/typescript-estree": "^6.11.0", + "@vitejs/plugin-legacy": "^4.0.0", "@vitejs/plugin-react": "^4.1.1", "cldr": "^7.4.0", "eslint": "^8.53.0", @@ -60,6 +63,7 @@ "if-node-version": "^1.1.1", "jsdom": "^22.1.0", "source-map-explorer": "^2.5.3", + "terser": "^5.30.4", "typescript": "^5.2.2", "vite": "^4.5.2", "vite-plugin-checker": "^0.6.2", diff --git a/vendor/github.com/libregraph/lico/identifier/vite.config.js b/vendor/github.com/libregraph/lico/identifier/vite.config.js index d89a6a218..8af1d0b71 100644 --- a/vendor/github.com/libregraph/lico/identifier/vite.config.js +++ b/vendor/github.com/libregraph/lico/identifier/vite.config.js @@ -1,6 +1,31 @@ -import { defineConfig, splitVendorChunkPlugin } from 'vite'; -import react from '@vitejs/plugin-react'; -import checker from 'vite-plugin-checker'; +import { defineConfig, splitVendorChunkPlugin } from "vite"; +import react from "@vitejs/plugin-react"; +import checker from "vite-plugin-checker"; +import legacy from "@vitejs/plugin-legacy"; + + +const addScriptCSPNoncePlaceholderPlugin = () => { + return { + name: "add-script-nonce-placeholderP-plugin", + apply: "build", + transformIndexHtml: { + order: "post", + handler(htmlData) { + + return htmlData.replaceAll( + /