๐ŸŒฑ Infra/KeyCloak 6

[keycloak ๋ง›๋ณด๊ธฐ #5] Keycloak์˜ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ํ†ตํ•ฉ

์ฐธ๊ณ ์ž๋ฃŒ์ฑ…: https://www.yes24.com/Product/Goods/122459785ํ…Œ์ŠคํŠธ ์†Œ์Šค์ฝ”๋“œ: https://github.com/PacktPublishing/Keycloak---Identity-and-Access-Management-for-Modern-Applications-2nd-Edition ํ†ตํ•ฉ ๋ฐฉ์‹ ์„ค๋ช… Keycloak๊ณผ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ํ†ตํ•ฉํ•  ๋•Œ,  Embedded์™€ Proxied ๋ฐฉ์‹์ด ์žˆ๋‹ค. ๊ฐ ๋ฐฉ๋ฒ•์€ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ๊ตฌ์กฐ์™€ ๋ณด์•ˆ ์š”๊ตฌ ์‚ฌํ•ญ์— ๋”ฐ๋ผ ์„ ํƒํ•  ์ˆ˜ ์žˆ๋‹ค.๊ตฌ๋ถ„EmbeddedProxied์„ค๋ช…์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ฝ”๋“œ ๋‚ด์—์„œ Keycloak ์–ด๋Œ‘ํ„ฐ๋ฅผ ์ง์ ‘ ์‚ฌ์šฉํ•˜์—ฌ ์ธ์ฆ ๋ฐ ๊ถŒํ•œ ๋ถ€์—ฌ๋ฅผ ์ฒ˜๋ฆฌํ•œ๋‹ค.์—ญ๋ฐฉํ–ฅ ํ”„๋ก์‹œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ  Keycloak๊ณผ์˜ ํ†ต์‹ ์„ ์ฒ˜๋ฆฌํ•˜๋Š” ์—ญ๋ฐฉํ–ฅ ํ”„๋ก์‹œ๋ฅผ ์„ค์ •ํ•˜์—ฌ ์• ..

[keycloak ๋ง›๋ณด๊ธฐ #4] Keycloak์˜ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ณด์•ˆ

์›น ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ณดํ˜ธ  1๏ธโƒฃ ๊ฐœ์š”์›น ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์€ ๊ธฐ๋ณธ์ ์œผ๋กœ ์ธ๊ฐ€์ฝ”๋“œํ๋ฆ„(Authorization Code Flow)๋ฅผ ์‚ฌ์šฉํ•ด์•ผํ•˜๋ฉฐ, PKCE(Proof key for Code Exchange)๋ฅผ ํ•จ๊ป˜ ์‚ฌ์šฉํ•˜๋Š”๊ฒƒ์ด ์ข‹๋‹ค.์ธ๊ฐ€์ฝ”๋“œ ํ๋ฆ„(Authorization Code Flow)๋Š” ์•„๋ž˜์™€ ๊ฐ™์€ ์ธ์ฆ ํ๋ฆ„์„ ๊ฐ€์ง„๋‹ค.# [์ดˆ๊ธฐ ๋กœ๊ทธ์ธ ํ๋ฆ„]Browser App Server Keycloak | | | |----(1) ์ ‘๊ทผ ์‹œ๋„------------>| | | ..

[keycloak ๋ง›๋ณด๊ธฐ #3] ์ ‘๊ทผ๊ถŒํ•œ์ธ๊ฐ€ ์ดํ•ดํ•˜๊ธฐ

์ฐธ๊ณ ์ž๋ฃŒ* ์ฑ…: https://www.yes24.com/Product/Goods/122459785* ํ…Œ์ŠคํŠธ ์†Œ์Šค์ฝ”๋“œ: https://github.com/PacktPublishing/Keycloak---Identity-and-Access-Management-for-Modern-Applications-2nd-Edition ์‹ค์Šต ์ค€๋น„) Keycloak & ํ…Œ์ŠคํŠธ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์„ธํŒ… Keycloak ์ค€๋น„Keycloak์„ ๋กœ์ปฌ์—์„œ ๋จผ์ € ์‹คํ–‰ํ•œ๋‹ค.docker run -p 8080:8080 \ -e KEYCLOAK_ADMIN=admin \ -e KEYCLOAK_ADMIN_PASSWORD=admin \ quay.io/keycloak/keycloak \ st..

[keycloak ๋ง›๋ณด๊ธฐ #2] OpenID Connection ์‚ฌ์šฉ์ž ์ธ์ฆ ์ดํ•ดํ•˜๊ธฐ

์ฐธ๊ณ ์ž๋ฃŒ* ์ฑ…: https://www.yes24.com/Product/Goods/122459785* ํ…Œ์ŠคํŠธ ์†Œ์Šค์ฝ”๋“œ: https://github.com/PacktPublishing/Keycloak---Identity-and-Access-Management-for-Modern-Applications-2nd-Edition์‹ค์Šต ์ค€๋น„) Keycloak & ํ…Œ์ŠคํŠธ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์„ธํŒ…Keycloak์„ ๋กœ์ปฌ์—์„œ ๋จผ์ € ์‹คํ–‰ํ•œ๋‹ค.docker run -p 8080:8080 \ -e KEYCLOAK_ADMIN=admin \ -e KEYCLOAK_ADMIN_PASSWORD=admin \ quay.io/keycloak/keycloak \ start-dev์ดํ›„ ํ…Œ์ŠคํŠธ..

[keycloak ๋ง›๋ณด๊ธฐ #1] Keycloak ๋กœ์ปฌ์—์„œ ๋„์šฐ๊ณ  Realm ๊ฐœ๋… ์ดํ•ดํ•˜๊ธฐ

๊ฐœ์š”Keycloak์€ ์˜คํ”ˆ์†Œ์Šค(Apache License2.0) ID ๋ฐ ์—‘์„ธ์Šค ๊ด€๋ฆฌ ์†”๋ฃจ์…˜์ด๋‹ค.์ด๊ฒƒ๋งŒ ์•Œ๊ณ  ์ผ๋‹จ ์‹œ์ž‘ํ•ด๋ณด์ž Keycloak ๋„์ปค๋กœ ๋„์›Œ๋ณด๊ธฐKeycloak์€ ์„ค์น˜ ๋งค๋‰ด์–ผ์ด ์ •๋ง ์ž˜๋˜์–ด์žˆ๋‹ค. ๊ณต์‹๋ฌธ์„œ์— ์ •๋ง ์ž์„ธํžˆ ์ž˜ ์ž‘์„ฑ๋˜์–ด์žˆ์–ด ๋ฌธ์„œ์— ๋”ฐ๋ผ ์ง„ํ–‰ํ•ด๋ณด์ž.docker run -p 8080:8080 \ -e KEYCLOAK_ADMIN=admin \ -e KEYCLOAK_ADMIN_PASSWORD=admin \ quay.io/keycloak/keycloak:24.0.4 \ start-devdocker run ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ์‰ฝ๊ฒŒ keycloak์„ ๋„์šธ ์ˆ˜ ์žˆ๋‹ค. http://localhost:8080 ์— ์ ‘์†ํ•˜๊ณ  ๋กœ๊ทธ์ธํ•ด๋ณด์ž. (id..

์ธ์ฆ ๋ฐ ๊ถŒํ•œ ํ”„๋กœํ† ์ฝœ OAuth 2.0, OpenID Connect, SAML ๊ทธ๋ฆฌ๊ณ  Zero Trust์— ๋Œ€ํ•˜์—ฌ

์ด ํฌ์ŠคํŒ…์—์„œ๋Š” ์ž์„ธํ•œ ๋‚ด์šฉ ๋ณด๋‹ค๋Š” ๊ฐœ๋…๋ง›๋ณด๊ธฐ๐Ÿ‘… ์ˆ˜์ค€์˜ ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค.  ๐Ÿ“Œ OAuth 2.0, OpenID Connect, SAML ๊ฐ„๋‹จ ๊ฐœ๋… ์ •๋ฆฌ OAuth 2.0: ๊ถŒํ•œ ๋ถ€์—ฌ์— ์ค‘์ ์„ ๋‘” ํ”„๋กœํ† ์ฝœOpenID Connect: OAuth 2.0์„ ํ™•์žฅํ•˜์—ฌ ์ธ์ฆ ๋ ˆ์ด์–ด ์ถ”๊ฐ€SAML: ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ ํ™˜๊ฒฝ์— ์ ํ•ฉํ•œ XML ๊ธฐ๋ฐ˜ ์ธ์ฆ ํ”„๋กœํ† ์ฝœ ๊ตฌ๋ถ„OAuth 2.0OpenID ConnectSAML๋ชฉ์ ๊ถŒํ•œ ๋ถ€์—ฌ(Authorization)์‚ฌ์šฉ์ž ์ธ์ฆ(Authentication)์‚ฌ์šฉ์ž ์ธ์ฆ(Authentication)๋ฐ์ดํ„ฐ ํ˜•์‹JSONJSONXML์‚ฌ์šฉ ์‚ฌ๋ก€API ์ธ์ฆ, ๋ชจ๋ฐ”์ผ ์•ฑ์†Œ์…œ ๋กœ๊ทธ์ธ, API ์ธ์ฆ๋ชจ๋ฐ”์ผ ์•ฑ, SPA, API ๊ธฐ๋ฐ˜ ์„œ๋น„์Šค์— ์ ํ•ฉ๊ธฐ์—… SSO, ์›น ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ธ์ฆ์ „ํ†ต์ ์ธ ์›น ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ์ ํ•ฉ๋ณต์žก์„ฑ..

728x90