Redmine plugin redmine_2fa安裝


)

前言

redmine_2fa是redmine的一個plugin,提供了登入redmine時雙因素驗證的機制。它的plugin頁面及github頁面分別為redmine_2fasouthbridgeio/redmine_2fa

安裝步驟

安裝redis

按照How To Install and Secure Redis on Ubuntu 20.04的步驟做即可。

安裝redmine_sidekiq

cd redmine/plugins/
git clone https://github.com/southbridgeio/redmine_sidekiq.git
# move to the rails application "redmine"'s directory!
cd ..
bundle install

安裝redmine_bots

cd redmine/plugins/
git clone https://github.com/southbridgeio/redmine_bots.git
# move to the rails application "redmine"'s directory!
cd ..
bundle install
RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=redmine_bots

安裝redmine_2fa

cd redmine/plugins/
git clone https://github.com/southbridgeio/redmine_2fa.git
# move to the rails application "redmine"'s directory!
cd ..
bundle install
RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=redmine_2fa

重新啟動apache2:

systemctl restart apache2

Troubleshooting

NoMethodError (undefined method `tr’ for nil:NilClass

安裝完成後如果在登入時出現NoMethodError (undefined method `tr' for nil:NilClass的問題,先檢查users表格中的otp_secret_key欄位是否為空。如果是,運行下面這條指令即可解決:

cd redmine
rails runner "User.find_each { |user| user.update_attribute(:otp_secret_key, ROTP::Base32.random_base32) } "

關聯issue:500 error with Google Auth, production.log - NoMethodError (undefined method `tr’ for nil:NilClass

使用方式

redmine_2fa安裝完成後,要登入redmine時會出現以下畫面:

redmine_2fa_select

選擇Google Authenticator

redmine_2fa_scan

參考透過 Google Authenticator 取得驗證碼這篇教學,下載Google Authenticator App,用App掃描上面的QR Code。

然後在驗證碼欄位輸入Google Authenticator App上出現的六位數字即可登入。

下次登入時會出現以下畫面,同樣開啟Google Authenticator App,輸入上面出現的六位數字即可。

redmine_2fa_verification_code

重設2fa otp secret key

使用管理員帳號登入redmine,進入users/<user_id>/edit,按下Reset 2FA按鈕重設。

redmine_2fa_reset

下次登入時,就會出現以下畫面,要求使用者重新綁定手機。

redmine_2fa_select

如果要重設所有人的otp secret key,也可以透過重新安裝redmine_2fa plugin來達成。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值