Skip to content

Instantly share code, notes, and snippets.

@amwolff
Last active March 1, 2023 12:17
Show Gist options
  • Save amwolff/8dfa1a0c24d9023b2398564d2822055b to your computer and use it in GitHub Desktop.
Save amwolff/8dfa1a0c24d9023b2398564d2822055b to your computer and use it in GitHub Desktop.
How to register an access grant @ Auth Service via HTTP(S) and DRPC(S)

HTTP(S)

Example with cURL

$ curl \
--header "Content-Type: application/json" \
--data '{"access_grant": "1uW6DdRk8aQ1CAK8H7K34BePSgSNFCy9vsZZgNmGrZBoqLrZS5Lu1pxaoDgyCF4NCY6KdiGyCyfAoNbxYoXMh9wWP6HgxkuQ1PCvC25DvoXjwaAkUqRXtFPhCb4hr5cTrLYLJnqcfKVEmXX6UeXXoBsQoktzXjYLjadzHX58XUWEpcZioqMqFGCUqnyzgRTTRZB2anQpADv1FCpuvombxZxzxTdd8HWEcRXmUAwVsNxavBHeLL7ymZMXihMb4FVrYvwUegmWXEg47f1x", "public": true}' \
-v https://auth.storjshare.io/v1/access

Example response

{"access_key_id":"ju2zprb7zcnwwycvahcoshmbjdfq","secret_key":"jzhcgyaus6vdskwhz63rkkbkwmyxk6b5mmkbhn73o3hy7y5ts75bg","endpoint":"https://gateway.storjshare.io"}

Example with authservice register (the API might break; use at your own risk)

$ docker run storjlabs/authservice:latest register \
--address https://auth.storjshare.io \
1uW6DdRk8aQ1CAK8H7K34BePSgSNFCy9vsZZgNmGrZBoqLrZS5Lu1pxaoDgyCF4NCY6KdiGyCyfAoNbxYoXMh9wWP6HgxkuQ1PCvC25DvoXjwaAkUqRXtFPhCb4hr5cTrLYLJnqcfKVEmXX6UeXXoBsQoktzXjYLjadzHX58XUWEpcZioqMqFGCUqnyzgRTTRZB2anQpADv1FCpuvombxZxzxTdd8HWEcRXmUAwVsNxavBHeLL7ymZMXihMb4FVrYvwUegmWXEg47f1x

Example response

Access Key ID: jwavylfj53n7ej5rwupqectdjkea
Secret Access Key: jybunb3ncgsuixlxdwe5ovcb6gdqxomghjcfubmndvjh2jsdrc7yo
Endpoint: https://gateway.storjshare.io

DRPC(S)

Example with uplink CLI

$ uplink access register 1uW6DdRk8aQ1CAK8H7K34BePSgSNFCy9vsZZgNmGrZBoqLrZS5Lu1pxaoDgyCF4NCY6KdiGyCyfAoNbxYoXMh9wWP6HgxkuQ1PCvC25DvoXjwaAkUqRXtFPhCb4hr5cTrLYLJnqcfKVEmXX6UeXXoBsQoktzXjYLjadzHX58XUWEpcZioqMqFGCUqnyzgRTTRZB2anQpADv1FCpuvombxZxzxTdd8HWEcRXmUAwVsNxavBHeLL7ymZMXihMb4FVrYvwUegmWXEg47f1x

Example response

========== CREDENTIALS ===================================================================
Access Key ID: jvru4bcznrqy37chqusfimxxyzhq
Secret Key   : jz366dr357dh2rml7akiceuxwi53gzih3rogr2r5ucvusfvdhoebc
Endpoint     : https://gateway.storjshare.io

Example with authservice register (the API might break; use at your own risk)

$ docker run storjlabs/authservice:latest register \
--address drpcs://auth.storjshare.io:7777 \
1uW6DdRk8aQ1CAK8H7K34BePSgSNFCy9vsZZgNmGrZBoqLrZS5Lu1pxaoDgyCF4NCY6KdiGyCyfAoNbxYoXMh9wWP6HgxkuQ1PCvC25DvoXjwaAkUqRXtFPhCb4hr5cTrLYLJnqcfKVEmXX6UeXXoBsQoktzXjYLjadzHX58XUWEpcZioqMqFGCUqnyzgRTTRZB2anQpADv1FCpuvombxZxzxTdd8HWEcRXmUAwVsNxavBHeLL7ymZMXihMb4FVrYvwUegmWXEg47f1x

Example response

Access Key ID: jusydf5ifwlnqrlfvjx54jmzllta
Secret Access Key: jz7odnbsooxuozgnlmhi3rhkucax4oshkegyvgek73w5wwozwjxey
Endpoint: https://gateway.storjshare.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment