Api token enhancement #2358

Merged
merged 5 commits into from Mar 27, 2017

Conversation

Projects
None yet
2 participants
@jtobard
Contributor

jtobard commented Mar 8, 2017

Api Token enhancement

Implemented the capability allow users to generate his own token with the configuration on aclpolicy:

context:
  application: 'rundeck'
for:
  resource:
    - equals:
        kind: user
      allow: [generate_self_token] 

This users can create tokens associated to his own user and can select a subset or all their roles to assign to the token.
And can be created with a custom duration in minutes, hours or days.
The max time allowed for this tokes is defined via property on the file framework.properties:

rundeck.user.tokens.duration=1h

Using the format: (integer number)(m/h/d)
For minutes, hours or days.

Also, users with admin privileges or with the configuration:

  application: 'rundeck'
for:
  resource:
    - equals:
        kind: user
      allow: [generate_service_token] 

Can create tokens for other others or create new users associated to the token with arbitrary groups .
The tokens can be created with a custom duration in minutes, hours or days, and the admin can create tokens without expiration time.

Its also possible create tokens from a custom file using rundeck.tokens.file on the same ways works now, but you can add more configuration to this new tokens:

username: token_string, grouplist

as example:

user: HW170LMS8w4rFwCj6qmYrUDrRYmm7H0d,dev,ops,qa

If you don't add groups, the default api_token_group value is used as group.
This tokens are created without expiration as long as they are on the configuration file they can be used.

@gschueler

This comment has been minimized.

Show comment
Hide comment
@gschueler

gschueler Mar 8, 2017

Member

for issues #1550 #1784

Member

gschueler commented Mar 8, 2017

for issues #1550 #1784

@gschueler gschueler added this to the 2.8.0 milestone Mar 8, 2017

@gschueler gschueler referenced this pull request Mar 25, 2017

Merged

api token groups #2385

@gschueler gschueler merged commit 4b37fe3 into rundeck:master Mar 27, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gschueler gschueler removed the in progress label Mar 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment