rht-labs / api-design

NO LONGER ACTIVE - Home of our Swagger / OpenAPI Specifications, System Designs and Documentation
Apache License 2.0
4 stars 5 forks source link

Support Users and groups at the team level - for IdM #54

Closed mcanoy closed 8 years ago

mcanoy commented 8 years ago

We are currently trying to implement the automation of users into the IdM. The api spec currently has a list of users at the engagement level called team. However, this does not support the idea that users can belong to different groups on the team.

Current:

  "team":  [
      { "user_name": "kmcanoy" }, 
      { "user_name": "obedin" }, 
      { "user_name": "jholmes" } 
    ]

Instead we would like to add the groups as well and have the users be attached to the groups that they belong to

  "team": {
    "users" : [
      { "user_name": "kmcanoy" }, 
      { "user_name": "obedin" }, 
      { "user_name": "jholmes" } 
    ],
    "groups": [
      { 
        "name": "admin",
        "members": [
          { "user_name": "kmcanoy" }, 
          { "user_name": "obedin" }, 
          { "user_name": "jholmes" }
        ]
      },
      {
        "name": "devops",
        "members": [
          { "user_name": "jholmes" }
        ]
      },
      {
        "name": "developer",
        "users": [
          { "user_name": "kmcanoy" }
        ]
      }
    ]
  }
}

Requires new team object with user array and group array. Modified group object with user array

This won't effect the group_to_role mapping

mcanoy commented 8 years ago

After discussing with @sherl0cks and @oybed the json output will look like this instead (Outer object is Engagement):

{
  ...
  "users" : [
    { "user_name": "kmcanoy" }, 
    { "user_name": "obedin" }, 
    { "user_name": "jholmes" } 
  ],
  "groups": [
    { 
      "name": "admin",
      "members": [
        { "user_name": "kmcanoy" }, 
        { "user_name": "obedin" }, 
        { "user_name": "jholmes" }
      ]
    },
    {
      "name": "devops",
      "members": [
        { "user_name": "jholmes" }
      ]
    },
    {
      "name": "developer",
      "users": [
        { "user_name": "kmcanoy" }
      ]
    }
  ]
}