Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running with least-priv user #5

Open
grtjn opened this issue May 16, 2017 · 0 comments
Open

Running with least-priv user #5

grtjn opened this issue May 16, 2017 · 0 comments

Comments

@grtjn
Copy link

grtjn commented May 16, 2017

Perhaps something to add to the README. You can run taskbot with a non-admin user, using the following role and amps (provided in Roxy ml-config format):

<role>
  <role-name>${app-name}-amp-role</role-name>
  <description>A role for all amps of the ${app-name} application</description>
  <privileges>
    <!-- required by taskbot -->
    <privilege>
      <privilege-name>xdmp:invoke</privilege-name>
    </privilege>
    <privilege>
      <privilege-name>xdmp:get-server-field</privilege-name>
    </privilege>
    <privilege>
      <privilege-name>xdmp:set-server-field</privilege-name>
    </privilege>
    <privilege>
      <privilege-name>xdmp:spawn</privilege-name>
    </privilege>
  </privileges>
</role>

<amp>
  <namespace>ns://blakeley.com/taskbot</namespace>
  <local-name>maybe-fatal</local-name>
  <doc-uri>/ext/mlpm_modules/taskbot/src/taskbot.xqm</doc-uri>
  <db-name>${modules-db}</db-name>
  <role-name>${app-name}-amp-role</role-name>
</amp>
<amp>
  <namespace>ns://blakeley.com/taskbot</namespace>
  <local-name>FATAL</local-name>
  <doc-uri>/ext/mlpm_modules/taskbot/src/taskbot.xqm</doc-uri>
  <db-name>${modules-db}</db-name>
  <role-name>${app-name}-amp-role</role-name>
</amp>
<amp>
  <namespace>ns://blakeley.com/taskbot</namespace>
  <local-name>fatal-set</local-name>
  <doc-uri>/ext/mlpm_modules/taskbot/src/taskbot.xqm</doc-uri>
  <db-name>${modules-db}</db-name>
  <role-name>${app-name}-amp-role</role-name>
</amp>
<amp>
  <namespace>ns://blakeley.com/taskbot</namespace>
  <local-name>spawn-function-with-policy</local-name>
  <doc-uri>/ext/mlpm_modules/taskbot/src/taskbot.xqm</doc-uri>
  <db-name>${modules-db}</db-name>
  <role-name>${app-name}-amp-role</role-name>
</amp>

Note: depending on what happens in the spawned function one provides oneself, one may need additional application specific privs..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant