【问题标题】:Create a user with Java with lowest rights in OrientDB在 OrientDB 中创建具有最低权限的 Java 用户
【发布时间】:2015-08-03 13:04:04
【问题描述】:

我通过以下方式创建具有最低权限的用户:

            db.command(new OCommandScript("sql", "insert into orole set name = 'ardaRole', mode = 0")).execute();
            db.command(new OCommandScript("sql", "update orole put rules = 'database.class', 2 where name = 'ardaRole'")).execute();
            db.command(new OCommandScript("sql", "update orole put rules = 'database.function', 2 where name = 'ardaRole'")).execute();
            db.command(new OCommandScript("sql", "update orole put rules = 'database.cluster', 2 where name = 'ardaRole'")).execute();
            db.command(new OCommandScript("sql", "insert into ouser set name = 'arda', password = 'arda', status = 'ACTIVE', roles = (select from ORole where name = 'ardaRole')"))
                    .execute();

效果很好。如果您想检查我的项目中的权利,请查看:http://arda-maps.org:2480 with arda arda

所以我的问题是这些权限仍然允许更改顶点名称(所以我将 LOVES 更改为 LOVESd)。但这正在扼杀整个数据库的结构和功能!

那么我怎样才能进一步限制这些权利呢?这真的很糟糕,因为我想让任何人都可以访问数据库。但是没有人应该能够改变刚才读到的任何东西......一定有办法......

【问题讨论】:

    标签: java database orientdb rights


    【解决方案1】:

    它似乎以上述方式工作。这只是特定用户的错误或临时更改,不会进一步损害数据库。所以代码完全没问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-09-16
      • 2011-03-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多