FreeKB - Broadcom API Gateway Create Identity Provider Users using the Gateway Migration Utility (GMU)
Broadcom API Gateway - Create Identity Provider Users using the Gateway Migration Utility (GMU)

This assumes you are familiar with the basic usage of the Gateway Migration Utility. Let's say you want to create a user in the Internal Identity Provider using the Gateway Migration Utility. 

Important - You can only create users in the Internal Identity Provider when using the Gateway Migration Utility

Create an XML file.

touch createIdpUser.xml

 

Add the following to the XML file. In this example, user john.doe will be created. In this example, 0000000000000000fffffffffffffffe is the ID of the Internal Identity Provider.

<l7:User xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management" providerId="0000000000000000fffffffffffffffe"> 
  <l7:Login>john.doe</l7:Login>
  <l7:Password>itsasecret</l7:Password>
</l7:User>

 

Issue the following command to create the user in the Internal Identity Provider.

/path/to/GatewayMigrationUtility.sh restman
-host apig.example.com
-port 8443
-username john.doe
-password f5VPX0yUJPg.m4BrjdgMv84UgktddJD3xA
-method POST
-path '1.0/identityProviders/0000000000000000fffffffffffffffe/users'
-request createIdpUser.xml

 

Or the -argFile option can be used, to reduce the number of options that are used on the command line.

/path/to/GatewayMigrationUtility.sh restman
-argFile example.properties
-method POST
-path '1.0/identityProviders/0000000000000000fffffffffffffffe/users'
-request createIdpUser.xml

 

You can then use the Gateway Migration Utility to ensure the User was created.

/path/to/GatewayMigrationUtility.sh restman
-argFile example.properties
-method GET
-path '1.0/identityProviders/0000000000000000fffffffffffffffe/users'
-query 'name=john.doe'

 

Which should return something like this.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<l7:List xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management">
    <l7:Name>USER List</l7:Name>
    <l7:Type>List</l7:Type>
    <l7:TimeStamp>2020-08-28T06:20:35.478-05:00</l7:TimeStamp>
    <l7:Link rel="self" uri="https://api.example.com:8443/restman/1.0/identityProviders/da698409abc96df215cf2f80b2175a41/users"/>
    <l7:Link rel="template" uri="https://api.example.com:8443/restman/1.0/identityProviders/da698409abc96df215cf2f80b2175a41/users/template"/>
    <l7:Item>
        <l7:Name>john.doe</l7:Name>
        <l7:Id>a51237cc16c31b69edd66bb1e7243219</l7:Id>
        <l7:Type>USER</l7:Type>
        <l7:TimeStamp>2020-08-28T06:20:35.478-05:00</l7:TimeStamp>
        <l7:Link rel="self" uri="https://api.example.com:8443/restman/1.0/identityProviders/da698409abc96df215cf2f80b2175a41/users/a51237cc16c31b69edd66bb1e7243219"/>
        <l7:Resource>
            <l7:User providerId="da698409abc96df215cf2f80b2175a41" id="a51237cc16c31b69edd66bb1e7243219">
                <l7:Login>john.doe</l7:Login>
                <l7:FirstName>John</l7:FirstName>
                <l7:LastName>Doe</l7:LastName>
                <l7:Email></l7:Email>
                <l7:Properties>
                    <l7:Property key="accountExpiration">
                        <l7:LongValue>-1</l7:LongValue>
                    </l7:Property>
                    <l7:Property key="enabled">
                        <l7:BooleanValue>true</l7:BooleanValue>
                    </l7:Property>
                    <l7:Property key="name">
                        <l7:StringValue>john.doe</l7:StringValue>
                    </l7:Property>
                </l7:Properties>
            </l7:User>
        </l7:Resource>
    </l7:Item>
</l7:List>

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 836d6 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |