Skip to content

Instantly share code, notes, and snippets.

@michaelrice
Last active October 9, 2018 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelrice/35aed5fb5f0679329aebfb7132507c09 to your computer and use it in GitHub Desktop.
Save michaelrice/35aed5fb5f0679329aebfb7132507c09 to your computer and use it in GitHub Desktop.
<saml2:Attribute Name="groups" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
<saml2:AttributeValue
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string">
fed_member_of_fishing_accounting
</saml2:AttributeValue>
<saml2:AttributeValue
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string">
fed_member_of_all_projects
</saml2:AttributeValue>
</saml2:Attribute>
@michaelrice
Copy link
Author

[
  {
    "remote": [
      {
        "type": "MELLON_email"
      },
      {
        "type": "MELLON_groups"
      }
    ],
    "local": [
      {
        "group": {
          "domain": {
            "name": "Default"
          },
          "name": "{1}"
        }
      },
      {
        "user": {
          "name": "{0}"
        }
       }
    ]
  }
]

@michaelrice
Copy link
Author

[root@pike-aio ~(keystone_admin)]# cat rules.test
MELLON_email: me@you.com
MELLON_groups: test1;test2;test3
[root@pike-aio ~(keystone_admin)]# keystone-manage mapping_engine --rules rules.json --input rules.test
{
  "group_ids": [],
  "user": {
    "domain": {
      "id": "Federated"
    },
    "type": "ephemeral",
    "name": "me@you.com"
  },
  "projects": [],
  "group_names": [
    {
      "domain": {
        "name": "Default"
      },
      "name": "['test1', 'test2', 'test3']"
    }
  ]
}

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