HPE Ezmeral Software platform
1832058 Members
3661 Online
110034 Solutions
New Discussion

Ecosystem token question

 
SOLVED
Go to solution
prusyn
Occasional Contributor

Ecosystem token question

Hi team,

could you please explain how to manually generate token for mapr ecosystem components?

Thanks in advance!

1 REPLY 1
maksym_oliinyk
Visitor
Solution

Re: Ecosystem token question

Token generation:
sh
java -cp $(mapr classpath) com.mapr.security.client.examples.MapRClient gettoken -cluster "<cluster-name>" -url "<service-url>"

Resourse Manager :
sh
java -cp $(mapr classpath) com.mapr.security.client.examples.MapRClient gettoken -cluster cyber.mapr.cluster -url "https://node6.cluster.com:8090/ws/v1/cluster"


Full example:

sh
TOKEN=$(java -cp `mapr classpath` com.mapr.security.client.examples.MapRClient gettoken -cluster cyber.mapr.cluster -url "https://node6.cluster.com:8090/ws/v1/cluster" | grep 'Obtained challenge string' | sed -E 's/Obtained challenge string (.*)/\1/')

# Use token once
curl -s -k -H "Authorization: MAPR-Negotiate $TOKEN" https://node6.cluster.com:8090/ws/v1/cluster | python -m json.tool

# Use token and save authentication cookie
curl -s -k -H "Authorization: MAPR-Negotiate $TOKEN" -c ./rm.cookie https://node6.cluster.com:8090/ws/v1/cluster | python -m json.tool

# Access this resource using saved cookie
curl -s -k -b ./rm.cookie https://node6.cluster.com:8090/ws/v1/cluster | python -m json.tool