用于在启动时加载 mongoRealmAuthenticator 的 Restheart 身份验证器插件
Restheart authenticator plugin for mongoRealmAuthenticator loading at startup
在 windows 上,我正在尝试按照文档中的建议切换到推荐的 Mongo Realm Authenticator,但是,在设置我的 restheart.yml 文件时完全按照文档我在启动时收到此错误:
“错误org.restheart.plugins.PluginsFactory - 向 AuthMechanism basicAuthMechanism 注入依赖时出错:未找到验证器 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": "a$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 'y' with 'a'
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,Windows10
simpleFileAuthenticator 工作正常,只有 MongoRealmAuthenticator 在我尝试将其用作任何身份验证机制的身份验证器时会导致问题。
mongoRealmAuthenticator 可从 RESTHeart 5.1 获得(请参阅发行说明 here)。
更新到最新版本以修复它。
在 windows 上,我正在尝试按照文档中的建议切换到推荐的 Mongo Realm Authenticator,但是,在设置我的 restheart.yml 文件时完全按照文档我在启动时收到此错误:
“错误org.restheart.plugins.PluginsFactory - 向 AuthMechanism basicAuthMechanism 注入依赖时出错:未找到验证器 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": "a$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 'y' with 'a'
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,Windows10
simpleFileAuthenticator 工作正常,只有 MongoRealmAuthenticator 在我尝试将其用作任何身份验证机制的身份验证器时会导致问题。
mongoRealmAuthenticator 可从 RESTHeart 5.1 获得(请参阅发行说明 here)。
更新到最新版本以修复它。