Repository navigation
v2.47.0
๐ SSO โ ๊ทธ๋ฃน์์ ์ ์ธ๋ ์ฌ์ฉ์์ ๊ถํ์ด ์ด์ ํ์คํ ํ์๋ฉ๋๋ค
โ ๏ธ ์
๊ทธ๋ ์ด๋ ์ ์ ํ์ธํด ์ฃผ์ธ์
SSO ๊ณต๊ธ์์ "๊ทธ๋ฃน โ ์ญํ ๋งคํ"์ ์ฐ๋ฉด์ "๊ธฐ๋ณธ ์ญํ "์ ๋น์ ๋์ จ๋ค๋ฉด, ์ ๊ทธ๋ ์ด๋ ์ ์ ๊ธฐ๋ณธ ์ญํ ์ ์ง์ ํด ์ฃผ์ธ์. ๊ทธ๋ ์ง ์์ผ๋ฉด ๋งคํ์ ๊ฑธ๋ฆฌ์ง ์๋ ์ฌ์ฉ์๋ ๋ก๊ทธ์ธ์ด ๊ฑฐ๋ถ๋ฉ๋๋ค.
๋ฌด์์ด ๋ฌธ์ ์๋์ง๋ถํฐ ๋ง์๋๋ฆฝ๋๋ค. IdP(Authelia, Authentik, Keycloak ๋ฑ)์์ ์ด๋ค ์ฌ์ฉ์๋ฅผ ๊ด๋ฆฌ์ ๊ทธ๋ฃน์์ ๋นผ๋, NPG๋ ๊ทธ ์ฌ์ฉ์๊ฐ ์์ ์ ๋ฐ์๋ ์ญํ ์ ๊ทธ๋๋ก ์ ์งํ ์ฑ ๋ก๊ทธ์ธ์์ผฐ์ต๋๋ค. ๊ธฐ๋ณธ ์ญํ ์ด ์ง์ ๋ผ ์์ผ๋ฉด ๊ทธ์ชฝ์ผ๋ก ๊ฐ๋ฑ๋์ง๋ง, ๋น์ ๋ ๊ฒฝ์ฐ์๋ ๊ถํ ํ์๊ฐ ์๋ฌด ํจ๊ณผ๊ฐ ์์์ต๋๋ค. ๊ด๋ฆฌ์ ๊ทธ๋ฃน์์ ์ ์ธ๋ ์ฌ๋์ด ๊ณ์ ๊ด๋ฆฌ์๋ก ๋ค์ด์ฌ ์ ์์๋ค๋ ๋ป์ ๋๋ค.
์ด์ ์ด๋ ๊ฒ ๋์ํฉ๋๋ค.
| IdP๊ฐ ๋ณด๋ธ ๊ทธ๋ฃน ์ ๋ณด | ๋์ |
|---|---|
| ๋งคํ์ ์ผ์นํ๋ ๊ทธ๋ฃน ์์ | ๋งคํ๋ ์ญํ ์ ์ฉ |
| ์ผ์น ์์ + ๊ธฐ๋ณธ ์ญํ ์์ | ๊ธฐ๋ณธ ์ญํ ๋ก ๊ฐ๋ฑ |
| ์ผ์น ์์ + ๊ธฐ๋ณธ ์ญํ ์์ | ๋ก๊ทธ์ธ ๊ฑฐ๋ถ (์ ๋์) |
| ๊ทธ๋ฃน ์ ๋ณด๊ฐ ์์ ์ ์ด | ๊ธฐ์กด ์ญํ ์ ์ง (์๋ ์ค๋ช ) |
"๊ทธ๋ฃน ์ ๋ณด๊ฐ ์ ์จ ๊ฒ"๊ณผ "๊ทธ๋ฃน์์ ๋น ์ง ๊ฒ"์ ๊ตฌ๋ถํฉ๋๋ค. ์ผ๋ถ ๊ณต๊ธ์(Authelia ๋ฑ)๋ ๊ทธ๋ฃน์ UserInfo ์๋ํฌ์ธํธ๋ก๋ง ๋ด๋ ค์ฃผ๋๋ฐ, ๊ทธ ์กฐํ๊ฐ ์ผ์์ ์ผ๋ก ์คํจํ๋ค๊ณ ํด์ ๊ถํ์ ํ์ํ๋ฉด ์ ๊น์ ์ฅ์ ๊ฐ ์๊ตฌ์ ์ธ ๊ถํ ๋ณ๊ฒฝ์ด ๋ฉ๋๋ค. ๊ทธ๋์ ๊ทธ๋ฃน ์ ๋ณด๊ฐ ์ค์ง ์์ ๊ฒฝ์ฐ์๋ ์๋ฌด๊ฒ๋ ๋ฐ๊พธ์ง ์๊ณ ๊ธฐ์กด ์ญํ ์ ์ ์งํ ๋ค ๊ฒฝ๊ณ ๋ง ๋จ๊น๋๋ค. ์ฐธ๊ณ ๋ก ์ง๊ธ๊น์ง๋ ์ด ๊ฒฝ์ฐ์ ๊ธฐ๋ณธ ์ญํ ๋ก ๊ฐ๋ฑํด ๋ฒ๋ ธ๋๋ฐ, ๊ทธ ๋ฌธ์ ๋ ํจ๊ป ๊ณ ์ณ์ก์ต๋๋ค.
๋ก๊ทธ์ธ์ด ๊ฑฐ๋ถ๋๋ฉด ์ด๋ ๊ฒ ํธ์๋ฉด ๋ฉ๋๋ค. ์ค์ โ SSO์์ ํด๋น ๊ณต๊ธ์์ ๊ธฐ๋ณธ ์ญํ ์ ์ง์ ํ๊ฑฐ๋(๊ฐ์ฅ ๊ถํ์ด ๋ฎ์ ์ญํ ์ ๊ถ์ฅ), IdP ์ชฝ ๊ทธ๋ฃน ๋งคํ์ ๋ฐ๋ก์ก์ผ๋ฉด ๋ฉ๋๋ค. ๊ด๋ฆฌ์ ๊ณ์ ์์ฒด๊ฐ ๋งํ ๊ฒฝ์ฐ์๋ ๋ก์ปฌ ๋ก๊ทธ์ธ์ ํญ์ ์ด์ ์๊ณ , ๊ทธ๋ง์ ์ด๋ ค์ฐ๋ฉด ๋ค์ ๋ช ๋ น์ผ๋ก ๋ณต๊ตฌํ ์ ์์ต๋๋ค.
docker compose exec api ./server reset-passwordSSO๋ก ์๋ ์์ฑ๋ ๊ณ์ ์ ๋ก์ปฌ ๋น๋ฐ๋ฒํธ๊ฐ ์์ผ๋ฏ๋ก, ๊ทธ๋ฐ ๊ณ์ ๋ง ์ฐ๊ณ ๊ณ์ ๋ค๋ฉด ์ ๊ทธ๋ ์ด๋ ์ ๊ธฐ๋ณธ ์ญํ ์ง์ ์ ํนํ ๊ถํฉ๋๋ค.
๋ณด๋ด ์ฃผ์ @heygoodluck ๋ ๊ฐ์ฌํฉ๋๋ค. (#260)
๐ ์์ ์ ์ ์ฅ๋ ์ํํ ๋ฆฌ๋ค์ด๋ ํธ๋ฅผ ์ด์ ๋ ์ ์์ต๋๋ค
๊ตฌ๋ฒ์ ์์ ์ ์ฅ๋ ๋ฆฌ๋ค์ด๋ ํธ ํธ์คํธ ์ค์๋ ์ง๊ธ ๊ธฐ์ค์ผ๋ก๋ ์์ ํ์ง ์์ ๊ฐ(์: ์ ๋ฌ ๊ฒฝ๋ก์ nginx ๋ณ์๊ฐ ๋ค์ด๊ฐ ๊ฒฝ์ฐ)์ด ๋จ์ ์์ ์ ์์ต๋๋ค. ๊ทธ๋ฐ ํญ๋ชฉ์ ๋นํ์ฑํ์กฐ์ฐจ ๋์ง ์์์ต๋๋ค. ์ ์ฅํ ๋ ์ ์ฒด ๊ฐ์ ๋ค์ ๊ฒ์ฌํ๋๋ฐ, ๊ธฐ์กด ๊ฐ์ด ๊ฒ์ฌ๋ฅผ ํต๊ณผํ์ง ๋ชปํด "๋๊ธฐ"๊น์ง ๋งํ ๋ฒ๋ ธ๊ธฐ ๋๋ฌธ์ ๋๋ค. ์ญ์ ๊ถํ์ด ์๋ ์ด์์๋ ์ํํ ์ค์ ์ ์ฆ์ ๋ด๋ฆด ๋ฐฉ๋ฒ์ด ์์์ต๋๋ค.
์ด์ ๋๋ ๊ฒ๋ง ํ๋ ๋ณ๊ฒฝ์ ํ์ฉ๋ฉ๋๋ค. ๊ฐ์ ๊ทธ๋๋ก ๋๊ณ ๋นํ์ฑํํ๋ฉด ์ ์ฅ๋๊ณ , ํด๋น nginx ์ค์ ์ด ์ ๊ฑฐ๋ฉ๋๋ค. ๊ฐ์ ์ค์ ๋ก ๋ฐ๊พธ๋ ค ํ๊ฑฐ๋ ๋นํ์ฑํ๋ ํญ๋ชฉ์ ๋ค์ ์ผ๋ ค ํ๋ฉด ์์ ์ฒ๋ผ ๊ฑฐ๋ถ๋๋ฏ๋ก, ์ํํ ์ค์ ์ด ๋์ด์๋๋ ์ผ์ ์์ต๋๋ค.
๊ฑฐ๋ถ๋ ๋์ ์๋ด๋ ์ข์์ก์ต๋๋ค. ์ง๊ธ๊น์ง๋ ๊ฐ์ด ๊ฑฐ๋ถ๋๋ฉด "๋ฐ์ดํฐ๋ฒ ์ด์ค ์ค๋ฅ"๋ก ํ์๋์ง๋ง, ์ด์ ์ด๋ค ํญ๋ชฉ์ด ์ ๊ฑฐ๋ถ๋๋์ง ์๋ ค ์ค๋๋ค.
๋ณด๋ด ์ฃผ์ @heygoodluck ๋ ๊ฐ์ฌํฉ๋๋ค. (#262)
๐งน ์ ์ง๋ณด์
- ์ํธํ ๋ผ์ด๋ธ๋ฌ๋ฆฌ(
golang.org/x/crypto)๋ฅผ 0.55.0์ผ๋ก ์ฌ๋ ธ์ต๋๋ค. (#266)
api ์ด๋ฏธ์ง๋ฅผ ๋ฐ์ ๋ค์ ์ฌ๋ ค ์ฃผ์ธ์.
docker compose pull && docker compose up -d
๐ SSO โ revoking a group now actually revokes the role
โ ๏ธ Please check this before upgrading
If your SSO provider uses group-to-role mappings but has no default role set, set one before upgrading. Otherwise users whose groups match no mapping will be denied sign-in.
Here is what was wrong. When you removed someone from an admin group at your IdP (Authelia, Authentik, Keycloakโฆ), NPG kept the role they had been granted earlier and signed them in anyway. With a default role configured they were demoted to it โ but with the field left empty, revoking the group had no effect at all. Someone removed from the admin group could keep signing in as an admin.
The behavior now:
| Groups the IdP sent | Result |
|---|---|
| Matches a mapping | Mapped role applied |
| No match + default role set | Demoted to the default role |
| No match + no default role | Sign-in denied (new) |
| No groups sent at all | Existing role kept (see below) |
"No groups were sent" and "removed from the group" are now told apart. Some providers (Authelia among them) serve groups only from the UserInfo endpoint, and treating a temporary lookup failure as a revocation would turn a brief outage into a permanent privilege change. So when no group claim arrives, nothing changes โ the existing role is kept and a warning is logged. Previously this case demoted the user to the default role, which is fixed too.
If a sign-in is denied, set a default role for that provider under Settings โ SSO (a least-privilege role is the right choice), or fix the group mapping at your IdP. Local sign-in always remains available, and if you are fully locked out:
docker compose exec api ./server reset-passwordAccounts created automatically by SSO have no local password, so if those are all you use, setting a default role before upgrading is strongly recommended.
Thanks to @heygoodluck for the contribution. (#260)
๐ Unsafe legacy redirects can finally be switched off
Redirect hosts saved by older versions may hold values today's validation rejects โ an nginx variable in the forward path, for example. Those entries could not even be disabled: saving re-validates the whole record, and the stored value failed, so "turn it off" was refused along with everything else. An operator without delete permission had no way to take a risky entry down.
A change that only disables an entry is now allowed. Leave the values as they are, switch it off, and it saves โ the nginx config for it is removed. Actually editing a value, or re-enabling a disabled invalid entry, is still rejected, so nothing unsafe comes back to life.
Rejections read better now, too: a refused value used to surface as "a database error", and now names the field and the reason.
Thanks to @heygoodluck for the contribution. (#262)
๐งน Housekeeping
- Bumped
golang.org/x/cryptoto 0.55.0. (#266)
Pull the api image and restart.
docker compose pull && docker compose up -d
Docker Images
docker pull svrforum/nginxproxyguard-api:2.47.0
docker pull svrforum/nginxproxyguard-ui:2.47.0
docker pull svrforum/nginxproxyguard-nginx:2.47.0Architectures: linux/amd64, linux/arm64
| Component | Status |
|---|---|
| API | Built |
| UI | Built |
| Nginx | Skipped (no changes) |
Contributors: @heygoodluck, @app/dependabot