Skip to main content

This library assists in the creation of signed Knox Cloud Access Tokens using python.

Project description

BuildStatus PyPI Version Active branch

Python Knox Access token - Helper (PyKATh)

This is not an offical Samsung library or repository

A colleciton of python code that assists in the creation of a signed access token to be used with the Samsung Knox Cloud Service 'KCS' APIs.
For more information on the flow of Samsung's Knox Cloud Authentication API - see their tutorial here: (https://docs.samsungknox.com/dev/knox-cloud-authentication/tutorial/tutorial-for-customers-generate-access-token/)

Currently supported KCS APIs

This library can generate signed Tokens for the following Samsung KC Services:

  • Knox Mobile Enrollment ('KME')
  • Knox Conifgure ('KC')
  • Knox E-FOTA ('KE1')
  • Knox Asset Intelligence ('KAI')
  • Knox Guard ('KG')
  • Knox Deployment Program ('KDP')

Todo

  • Knox Manage ('KM') is currently not supported, but work is in progress.

Prerequesits

pip install PyKATh requests

Getting Started

## Initialize the Knox Token Library. 
kat = knox_common.KnoxAccessToken(kcsKeyFilePath = 'keys.json', regionalServer = 'us-kcs-api.samsungknox.com', clientId = cId)

## request a signed token for a specific KCS ClientId.
signedKCSToken = kat.getSignedAccessToken()

## Use this balue in the 'x-knox-apitoken' header to call most KCSAPis (for 30mins) in the
print(signedKCSToken) 

TODO

  • docs
  • KM API Helper
  • create API examples for each service

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyKATh-0.1.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PyKATh-0.1.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file PyKATh-0.1.2.tar.gz.

File metadata

  • Download URL: PyKATh-0.1.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for PyKATh-0.1.2.tar.gz
Algorithm Hash digest
SHA256 158f58c114c067b70fc689de87fd9d2b42e9a9f3bf4e8aa5c21c13ea12be4e03
MD5 9a92fc3a6a5bf98184fcfe940facdd10
BLAKE2b-256 de2b040b70c4c71895e7ca440f4e0dd8bc2d00232736118bf3b728d11f41a6ec

See more details on using hashes here.

File details

Details for the file PyKATh-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: PyKATh-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for PyKATh-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6741b8737c05a5a50f987d5ece3d318a826439cf65a152a58bd285c30f9f2a36
MD5 fb61dff1960c98ad160cdffe10f230ab
BLAKE2b-256 4d50654ccbdb686bd39f004e1c4a278ee77bc2eac598e0f895fde420bd33ba1d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page