Thanks for your speedy reply Jason.
We have DMC installed in a lab and won't be rolling out to higher environments for a while. Do you have an estimated release date for 3.1.5 or a link to a page where I can check for news please? I'm just wondering if it's worth me spending time on scripting when the new release group feature would be perfect for us.
------------------------------
Colin Chapman
------------------------------
Original Message:
Sent: Thu May 27, 2021 02:17 AM
From: Jason Sizto
Subject: DMC: How to make connection profile user default to public?
Hi Colin,
The option dsweb.default.profileuser.role=enable is not supported in 3.1.4, but, it will be supported in upcoming 3.1.5 release. Also, there will be enhancement to grant connection profile as a group to improve ease of use.
Another way to grant connection profile to individual user can be done via RESTful APIs. I am attaching a script that you can grant multiple connection profiles to multiple users with connection profile owner OR connection profile user privilege. There will be some editing for you to fill in the connection profiles and users that you need to grant. Let me know if you have questions in calling the RESTful API.
Sample: grantConnectionProfilePrivileges.sh (This script uses jq json processor for parsing)
#!/bin/bash
#echo -n "Enter the DMC Username: "
#read DMCUSERID
#echo -n "Enter the DMC Password: "
#read -s DMCPASSWD
#echo ""
#echo -n "Enter the hostname / ip address for DMC: "
#read DMCHOST
DMCUSERID=db2inst1
DMCPASSWD=mypassword
DMCHOST=buddy1.fyre.ibm.com
## GET the token
TOKEN=$(curl --silent --insecure -X POST \
https://$DMCHOST:11081/dbapi/v4/auth/tokens \
-H 'content-type: application/json' \
-d '{"userid":"'$DMCUSERID'","password":"'$DMCPASSWD'"}' \
| jq -r '.token'
)
#echo $TOKEN
#echo -n "Enter the Connection Profile name to set privilege: "
#read DBPROFILE_NAME
DBPROFILE_NAME1=TPCDS_1G
DBPROFILE_NAME2=DMCREPO
#echo -n "Enter the userid for setting connection USER privilege: "
#read CONN_USER
CONN_USER1=mary
CONN_USER2=paul
#echo -n "Enter the userid for setting connection OWNER privilege: "
#read CONN_OWNER
CONN_OWNER1=caroline
CONN_OWNER2=isabella
# grant set of user privilege to set of connection profiles
USERS=$(curl --silent --insecure -X POST \
https://$DMCHOST:11081/dbapi/v4/userProfilePrivileges/?action=assign \
-H 'authorization: Bearer '$TOKEN \
-H 'content-type: application/json' \
-d '[
{"profileName":"'$DBPROFILE_NAME1'",
"USER":["'$CONN_USER1'","'$CONN_USER2'"],
"OWNER":["'$CONN_OWNER1'","'$CONN_OWNER2'"]
},
{"profileName":"'$DBPROFILE_NAME2'",
"USER":["'$CONN_USER1'","'$CONN_USER2'"],
"OWNER":["'$CONN_OWNER1'","'$CONN_OWNER2'"]
}
]'
)
echo "grant set of user privilege to set of connection profiles:"
echo $USERS | jq '.'
echo
------------------------------
Jason Sizto
Original Message:
Sent: Wed May 26, 2021 12:08 PM
From: Colin Chapman
Subject: DMC: How to make connection profile user default to public?
Hi folks,
I'm using DMC 3.1.4 with repository authentication enabled. I'd like to add connection profiles in bulk and as I have a lot of potential users I'd like the connection profile user privilege to default to public. Otherwise there appears to be a significant manual admin overhead of adding the profile user userids manually.
With Data Server Manager this feature was enabled by setting dsweb.default.profileuser.role=enable in <dmc_install_location>/Config/dswebserver.properties. Does DMC have a similar feature?
Thanks!
------------------------------
Colin Chapman
------------------------------
#Db2