簡體   English   中英

Restheart 驗證器插件,用於在啟動時加載 mongoRealmAuthenticator

[英]Restheart authenticator plugin for mongoRealmAuthenticator loading at startup

在 windows 上,我正在嘗試按照文檔中的建議切換到推薦的 Mongo Realm Authenticator,但是,當完全按照文檔中所示設置我的 restheart.yml 文件時,我在啟動時收到此錯誤:

“錯誤 org.restheart.plugins.PluginsFactory - 將依賴項注入到 AuthMechanism basicAuthMechanism 時出錯:未找到 Authenticator mongoRealmAuthenticator”

這是我restheart.yml的相關部分供參考。

auth-mechanisms:
  tokenBasicAuthMechanism:
    enabled: true
  basicAuthMechanism:
    enabled: true
    authenticator: mongoRealmAuthenticator
  digestAuthMechanism:
    enabled: false
    realm: RESTHeart Realm
    domain: localhost
    authenticator: simpleFileAuthenticator
  identityAuthMechanism:
    enabled: false
    username: admin
    roles:
      - admin
      - user

authenticators:
  mongoRealmAuthenticator:
    users-db: restheart
    users-collection: users
    prop-id: _id
    prop-password: password
    json-path-roles: $.roles
    bcrypt-hashed-password: true
    bcrypt-complexity: 12
    create-user: true
    create-user-document: '{"_id": "admin", "password": "$2a$12$lZiMMNJ6pkyg4uq/I1cF5uxzUbU25aXHtg7W7sD2ED7DG1wzUoo6u", "roles": ["admin"]}'
    # create-user-document.password must be hashed when bcrypt-hashed-password=true
    # default password is 'secret'
    # see https://bcrypt-generator.com but replace initial '$2y' with '$2a'
    cache-enabled: false
    cache-size: 1000
    cache-ttl: 60000
    cache-expire-policy: AFTER_WRITE
  simpleFileAuthenticator:
    enabled: true
    conf-file: {{{users-conf-file}}}

Restheart 版本為 5.0,MongoDb 版本為 4.2,Windows 10

simpleFileAuthenticator 工作正常,當我嘗試將其用作任何身份驗證機制的身份驗證器時,只有 MongoRealmAuthenticator 會導致問題。

mongoRealmAuthenticator 可從 RESTHeart 5.1 獲得(請參閱 此處的發行說明)。

更新到最新版本以修復它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM