Can we create new roles in graylog community instance

Hello Team,

Can we create new roles in graylog community instance 4.0.6, i know that
To use the group synchronization functionality you need the Graylog Enterprise license and the Graylog Enterprise plugin.

can we create new roles in community instance, if yes can you guide how we can do that. any way to add new roles in mongo or any alternate way. Please guide.



Yes, you can still create custom role with custom permissions with REST API:
curl -i -X POST -u admin:PASS -H 'Content-Type: application/json' -H 'X-Requested-By: cli' '' -d @custom-role.json

File content custom-role.json :

  "name": "Custom",
  "description": "Custom role",
  "permissions": [
  "read_only": false

To get list of possible permission check this:
curl -XGET -u admin:PASS ''

Note: Some permissions are mandatory for role, without them role can’t work, you will see error messages in web after login with user assigned custom role, you need to experiment.

Then assign newly created role to newly created user. This way you can assign whichever role to newly created user. Or you can assign/unassign role for user from System - Roles. If you try to unassign role from System - Users and Teams it’s not possible without Reader role. Anyway Reader role can’t be unassigned by web gui, if assigned once, but you can unassign Reader role from user using API:

curl -i -X DELETE -u admin:tdXd3RMW -H 'Content-Type: application/json' -H 'X-Requested-By: cli' ''

ROLE_ID can be received by this little bash snippet:

# Unassign Reader role for user
# Username

# Get id of Role (Reader)
ROLEID=$(curl -s -X GET -u admin:PASS -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'X-Requested-By: cli' ''| jq -r '.roles[] | select(.name=="'"$ROLE"'") | .id')

# Unassign Reader role
curl -i -X DELETE -u admin:PASS -H 'Content-Type: application/json' -H 'X-Requested-By: cli' ''"$ROLEID"'/assignee/'"$USERNAME"''

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.