博客 / 詳情

返回

體驗開源IAM系統 - authelia

開源調研

authelia 是目前勢頭最猛的,star數最高的開源 IAM 系統。

圖片

參考文檔

  • https://github.com/topics/sso
  • https://medium.com/@devops.en...
  • https://github.com/kdeldycke/...
  • https://sendoh-daten.medium.c...
  • https://news.ycombinator.com/...
  • https://blog.csdn.net/u010381...
  • https://blog.csdn.net/little_...
  • https://supertokens.com/blog/...

配置 lite

部署參考:https://www.yoyoask.com/?p=4619

為了體驗效果,我們需要修改以下內容

  • 修改 notifier 為本地文件
  • 增加 identity_providers

    • 生成 issuer_certificate_chain 和 issuer_private_key
    • 生成 client 的 secret
    • 修改 client 的 scopes,增加 offline_access
    • 修改 redirect uris
# 進入 lite 目錄
cd examples/compose/lite

# 啓動服務
docker-compose up -d

# 關閉服務
docker-compose stop

# 重啓服務
docker-compose restart

# 觀察日誌
docker logs -f authelia

添加 oauth client

下載代碼:https://github.com/authelia/o...

# 編譯
go build .

# 啓動
# id 和 secret 要和 identity_providers.clients.[].id 和 secret 一致
# scopes 要增加 offline_access,這樣可以獲取 refresh token
# -i 要和 docker-compose 裏 authelia lables 裏面 host 一致
./oidc-tester-app -i https://authelia.example.com --id myapp --secret fu4HCuhk5npiKawlQcyuj1Bs8hnvHrIfu1uj2J0XroKwq1thPVq8JgVXWE4uuifSeBfbZaAn --scopes openid,offline_access,profile,email,groups 

效果

public

image.png

traefik

image.png

secure

image.png

authelia

image.png
image.png
image.png

oidc 相關

image.png
image.png

oauth client

image.png
image.png
image.png

在 jwt.io 上解密 Raw

image.png

user avatar
0 位用戶收藏了這個故事!

發佈 評論

Some HTML is okay.