System Keys

The system keys routes allows you to manage the system keys available to the Atlas application.

Public Keys

You can view or regenerate the public key used by the Atlas Application

View the public key

Call to /system/keys/pub to get the public key

Request Object

+ URL
  /api/v2/system/keys/pub

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Parameters
  user (string, optional, Body) - If you would like to view the public keys for a user, you can specify that username here. The default is the public key used by the API user

+ Body
  {}

Response Object

Sending this will return to you the public key.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFtf+wjYIOHl1U+JoFRR3e6ZFv6Awq2u4qF6VVmx8NZkBKkX08+tctdf/VIXE+nHE1ai/XKh1MmUEUdZxGcgwjNai7+VEdDP9T6Xo/UaTBA/WzioZgu93l385wU/x65Un/tWvag0ibjGcDCZ2swR/3jGgvpawLqYZW1oFp9Sr8ZokRWznZ8y37zp9kK0pkR8wFUHhwRhVAsaiD/7mDBS9ZdsaRvqgu44bUfgoU0UPI+Xk2hY3Je1YHi4JHoypi5TC4YVOyVgttypIE22XkTNeGy5xWMul6KsGoU2EqrdPEvdlpeINP38KajEXFA2Yg2J1njnlghyoz00uvqq8T7Q31 od-api@opendrives-09e3b2bd\n"
  }

Regenerate the public key

Call to /system/keys/pub/generate to regenerate the public key. Warning: This will invalidate the ssh connections from other systems if you’ve given them your public key.

Request Object

+ URL
  /api/v2/system/keys/pub/generate

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Parameters
  user (string, optional, Body) - If you would like to generate ssh keys for a specific user, you can specify that username here. The default is the public key used by the API user

+ Body
  {}

Response Object

Sending this will return to you an empty object.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {}

Authorized Keys

Authorized keys are ssh keys that are allowed to ssh into the system.

View the authorized keys

A list of authorized keys is available from the API.

Request Object

+ URL
  /api/v2/system/keys/auth

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Parameters
  user (string, optional, Body) - If you would like to check the authorized keys for a user, you can specify that username here

+ Body
  {}

Response Object

Sending this with no user will return to you the authorized keys used in the system.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  [
    {
      "index": 0,
      "algo": "ssh-rsa",
      "blob": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDNOLXLYkxdgRQHIf3j+35ZEEnAk7sbVd/RvqaSuCJQIZp3XemR6T6ugdsvCsLZwco0bR1VybsKD8eKxUIlJJlLDpjXV/qcm7Dq0ZTSBjOa+NmvAcv0oPMOFpxN0kKMH3JoilOakNy9UAwW4iwUkk0tx/Lr+LjsinAFjG/EVq4gIjIPjnUaHEJJXs2BPVb4uf344kio8Fqf/ZmEBO31T+3PBeA0Fd3hJXs4viHxZp7Gk6I3MI03F/Nb/5YsAd6LCMmDpqKyIlfUoU03QegqAUfLyRaI6UeWtEpnHSI0nFINy9jBv++CVylK37gAUwIXLDmrnmA7zIpEmVwLXNUPM/kN",
      "comment": "od-api@opendrives-6fb117bd",
      "fingerprint": "4d:53:09:36:30:90:4f:43:06:21:55:8b:ef:ab:0e:82",
      "line": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNOLXLYkxdgRQHIf3j+35ZEEnAk7sbVd/RvqaSuCJQIZp3XemR6T6ugdsvCsLZwco0bR1VybsKD8eKxUIlJJlLDpjXV/qcm7Dq0ZTSBjOa+NmvAcv0oPMOFpxN0kKMH3JoilOakNy9UAwW4iwUkk0tx/Lr+LjsinAFjG/EVq4gIjIPjnUaHEJJXs2BPVb4uf344kio8Fqf/ZmEBO31T+3PBeA0Fd3hJXs4viHxZp7Gk6I3MI03F/Nb/5YsAd6LCMmDpqKyIlfUoU03QegqAUfLyRaI6UeWtEpnHSI0nFINy9jBv++CVylK37gAUwIXLDmrnmA7zIpEmVwLXNUPM/kN od-api@opendrives-6fb117bd"
    },
    {
      "index": 1,
      "algo": "ssh-rsa",
      "blob": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDFtf+wjYIOHl1U+JoFRR3e6ZFv6Awq2u4qF6VVmx8NZkBKkX08+tctdf/VIXE+nHE1ai/XKh1MmUEUdZxGcgwjNai7+VEdDP9T6Xo/UaTBA/WzioZgu93l385wU/x65Un/tWvag0ibjGcDCZ2swR/3jGgvpawLqYZW1oFp9Sr8ZokRWznZ8y37zp9kK0pkR8wFUHhwRhVAsaiD/7mDBS9ZdsaRvqgu44bUfgoU0UPI+Xk2hY3Je1YHi4JHoypi5TC4YVOyVgttypIE22XkTNeGy5xWMul6KsGoU2EqrdPEvdlpeINP38KajEXFA2Yg2J1njnlghyoz00uvqq8T7Q31",
      "comment": "od-api@opendrives-09e3b2bd",
      "fingerprint": "5c:64:c8:f6:9b:5a:ba:fc:32:b6:6f:f4:03:aa:69:d7",
      "line": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFtf+wjYIOHl1U+JoFRR3e6ZFv6Awq2u4qF6VVmx8NZkBKkX08+tctdf/VIXE+nHE1ai/XKh1MmUEUdZxGcgwjNai7+VEdDP9T6Xo/UaTBA/WzioZgu93l385wU/x65Un/tWvag0ibjGcDCZ2swR/3jGgvpawLqYZW1oFp9Sr8ZokRWznZ8y37zp9kK0pkR8wFUHhwRhVAsaiD/7mDBS9ZdsaRvqgu44bUfgoU0UPI+Xk2hY3Je1YHi4JHoypi5TC4YVOyVgttypIE22XkTNeGy5xWMul6KsGoU2EqrdPEvdlpeINP38KajEXFA2Yg2J1njnlghyoz00uvqq8T7Q31 od-api@opendrives-09e3b2bd"
    }
  ]

Add to the authorized keys

You can add to the authorized keys via this route

Request Object

+ URL
  /api/v2/system/keys/auth/add

+ Method
  POST

+ Parameters
  key (string, required, Body) - The key to add to the trusted ssh keys list

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    "key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8jw2Dr//Iw4FwfQhzul5ZCJXoFphwjaZYhw4+IH0CEXsbCPASTTYHjdDIEvGPukWK7UY4cDu63YL2iDotrUw0cMO3xHNq21Qe+GffAZXbwBdIF5Epi5RQiD12tO/adcunNbmGZqBeJHKfrye1ETfy/f0h6nHgtg9vfsCgz9Oo+bUcJ0mEBY4EFmADmA0id8myOv/uOG+gnmM0fMAoj2uMiEFH5J93ucm24MxHullUBiiByS31NsTVsq3t+C/7SNokOzSqKktJtbW2qU0bTxEeJJL9y4WrVG/kWB2+LD4JieEt9maXNgTtp3L0shjSMpNvKpeI/zMrdi/sbnUQCk69 od-api@opendrives-b6864f2b"
  }

Response Object

Sending this will return to you the authorized key you have added to the system.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "algo": "ssh-rsa",
    "blob": "AAAAB3NzaC1yc2EAAAADAQABAAABAQC8jw2Dr//Iw4FwfQhzul5ZCJXoFphwjaZYhw4+IH0CEXsbCPASTTYHjdDIEvGPukWK7UY4cDu63YL2iDotrUw0cMO3xHNq21Qe+GffAZXbwBdIF5Epi5RQiD12tO/adcunNbmGZqBeJHKfrye1ETfy/f0h6nHgtg9vfsCgz9Oo+bUcJ0mEBY4EFmADmA0id8myOv/uOG+gnmM0fMAoj2uMiEFH5J93ucm24MxHullUBiiByS31NsTVsq3t+C/7SNokOzSqKktJtbW2qU0bTxEeJJL9y4WrVG/kWB2+LD4JieEt9maXNgTtp3L0shjSMpNvKpeI/zMrdi/sbnUQCk69",
    "comment": "od-api@opendrives-b6864f2b",
    "fingerprint": "8b:af:33:69:8c:8a:19:31:7b:b9:c6:54:c2:95:77:db",
    "line": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8jw2Dr//Iw4FwfQhzul5ZCJXoFphwjaZYhw4+IH0CEXsbCPASTTYHjdDIEvGPukWK7UY4cDu63YL2iDotrUw0cMO3xHNq21Qe+GffAZXbwBdIF5Epi5RQiD12tO/adcunNbmGZqBeJHKfrye1ETfy/f0h6nHgtg9vfsCgz9Oo+bUcJ0mEBY4EFmADmA0id8myOv/uOG+gnmM0fMAoj2uMiEFH5J93ucm24MxHullUBiiByS31NsTVsq3t+C/7SNokOzSqKktJtbW2qU0bTxEeJJL9y4WrVG/kWB2+LD4JieEt9maXNgTtp3L0shjSMpNvKpeI/zMrdi/sbnUQCk69 od-api@opendrives-b6864f2b"
  }

Remove from the authorized keys

You can remove from the authorized keys via this route

Request Object

+ URL
  /api/v2/system/keys/auth/remove

+ Method
  POST

+ Parameters
  fingerprint (string, required, Body) - The fingerprint of the key to remove from the trusted ssh keys list

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
   "fingerprint": "8b:af:33:69:8c:8a:19:31:7b:b9:c6:54:c2:95:77:db"
  }

Response Object

Sending this will return to you the fingerprint of the key removed.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
   "fingerprint": "8b:af:33:69:8c:8a:19:31:7b:b9:c6:54:c2:95:77:db"
  }