Decoding netosecret

netosecret is a base64 encoded JSON string containing Fusion API credentials

netosecret is an updated format for simplifying sharing API connection and authentication information with Netography Fusion API clients.

Previously, to authenticate to the Netography Fusion API required you copy 5 separate fields ((url, shortname, appname, sharedsecret, appkey). netosecret is a base64 encoded JSON object containing these 5 key:values, so when you generate a new API key in the Fusion Portal, you only need to copy the 1 netosecret string that it displays.

netosecret contains the appkey and sharedsecret in it, so it must also be treated as a secret and stored and shared securely

Decoding netosecret

Decode this string by copying it into the widget below (if you do not see the JSFiddle widget due to browser security restrictions, use one of the other methods on this page to decode it).

Sample netosecret value:

ewogICJ1cmwiOiAiaHR0cHM6Ly9hcGkubmV0b2dyYXBoeS5jb20vYXBpL3YxIiwKICAic2hvcnRuYW1lIjogIm15c2hvcnRuYW1lIiwKICAiYXBwbmFtZSI6ICJteWFwcG5hbWUiLAogICJzaGFyZWRzZWNyZXQiOiAibXlzaGFyZWRzZWNyZXQiLAogICJhcHBrZXkiOiAibXlhcHBrZXkiCn0


netosecret is a base64 encoded string of JSON containing 5 key:value pairs

{  
 "url": "https://api.netography.com/api/v1",  
 "shortname": "myshortname",  
 "appname": "myappname",  
 "sharedsecret": "mysharedsecret",  
 "appkey": "myappkey"  
}

netosecret is encoded, not encrypted

netosecret is not encrypted. It is encoded. You can encode the separate fields into a netosecret, and decode a netosecret into its 5 separate fields in a few lines from a command line or any programming language.

netosecret does NOT replace a JWT request token

The netosecret is not passed to the API directly. It is decoded to retrieve the fields used to construct the JWT request token and send it to the right API endpoint.

Netography API clients will add support for netosecret in upcoming releases

The Fusion Portal will produce the netosecret format when generating an API key, in addition to the existing fields, as of the August 2024 release. Netography components that use the API will be adding support for using this format in an upcoming release. They will continue to support using the individual fields, and your existing API keys will be unaffected.

Decoding netosecretwith base64 on Linux/Mac

If you generated an API key and received the netosecret value ewogICJ1cmwiOiAiaHR0cHM6Ly9hcGkubmV0b2dyYXBoeS5jb20vYXBpL3YxIiwKICAic2hvcnRuYW1lIjogIm15c2hvcnRuYW1lIiwKICAiYXBwbmFtZSI6ICJteWFwcG5hbWUiLAogICJzaGFyZWRzZWNyZXQiOiAibXlzaGFyZWRzZWNyZXQiLAogICJhcHBrZXkiOiAibXlhcHBrZXkiCn0

You can pipe that value into base64 -d on Linux or Mac to decode the base64 and see the JSON object.

NETOSECRET=ewogICJ1cmwiOiAiaHR0cHM6Ly9hcGkubmV0b2dyYXBoeS5jb20vYXBpL3YxIiwKICAic2hvcnRuYW1lIjogIm15c2hvcnRuYW1lIiwKICAiYXBwbmFtZSI6ICJteWFwcG5hbWUiLAogICJzaGFyZWRzZWNyZXQiOiAibXlzaGFyZWRzZWNyZXQiLAogICJhcHBrZXkiOiAibXlhcHBrZXkiCn0=  
echo $NETOSECRET|base64 -d

Output:

{  
  "url": "<https://api.netography.com/api/v1">,  
  "shortname": "myshortname",  
  "appname": "myappname",  
  "sharedsecret": "mysharedsecret",  
  "appkey": "myappkey"
}

Decoding netosecret with certutil on WIndows

On Windows, if you saved the netosecretto a file netosecret.txt, you can run:

certutil -decode netosecret.txt netosecret-decoded.txt

netosecret.py- Python class and CLI for encoding/decoding

netosecret.sh - bash shell script for encoding/decoding