Skip to main content

EMR Serverless Custom Authenticator for spark magic kernel.

Project description

EMR Serverless Custom Sparkmagic Authenticator.

This package provides a custom implementation Jupyter Incubator Spark magic Kernel Custom Authenticator interface to enable integration from EMR-Serverless Application. The Custom Authenticator subclasses shipped in this package computes the AWS Signature Version 4 and appends HTTP Authentication headers to the request to the public livy endpoint exposed by EMR Serverless Application.

Pre-requisite

This package assumes that spark magic package is either already installed or will be installed by the consumer on the python environment to be used.

Steps to Install

pip install emr-serverless-customauth

This will install the package along with its dependencies.

Configuring Custom Authenticator with Sparkmagic

Please refer to the steps mentioned here on the spark magic github repository.

  1. Add a new custom auth to authenticators map present in sparkmagic config.json file.
{
   ....
    "authenticators": {
        "Kerberos": "sparkmagic.auth.kerberos.Kerberos",
        "None": "sparkmagic.auth.customauth.Authenticator",
        "Basic_Access": "sparkmagic.auth.basic.Basic",
        "EMRServerlessAuth": "emr_serverless_customauth.customauthenticator.EMRServerlessCustomSigV4Signer"
  },
  ....
}
  1. Update the corresponding python and/or scala kernels present in sparkmagic config.json file to use the EMRServerlessAuth.
{
  "kernel_python_credentials": {
    "username": "",
    "password": "",
    "url": "https://<emr-serverless-app-id>.livy.emr-serverless-services.<aws-region>.amazonaws.com",
    "auth": "EMRServerlessAuth"
  },
  "kernel_scala_credentials": {
    "username": "",
    "password": "",
    "url": "https://<emr-serverless-app-id>.livy.emr-serverless-services.<aws-region>.amazonaws.com",
    "auth": "EMRServerlessAuth"
  }
  .....

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

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

emr_serverless_customauth-1.0.1.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

emr_serverless_customauth-1.0.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file emr_serverless_customauth-1.0.1.tar.gz.

File metadata

File hashes

Hashes for emr_serverless_customauth-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d51c136cf6150a4cb194eeba80a2e4100bc4eedee1e4cadd984a0c94aaa02799
MD5 12da1dbb7a8ce6daf7d774800957b348
BLAKE2b-256 426f904770b6daeec494f18e71578fb0b1c128ef5fbf9f929de713a62dfa5a93

See more details on using hashes here.

File details

Details for the file emr_serverless_customauth-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for emr_serverless_customauth-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 807e9b3a09875a68dce74767c9602588bfb573439609aef4419607e283cc8e3e
MD5 cfbc4961c9ef1054e3fffb6b900a076d
BLAKE2b-256 fa226163cdd572bde5d39c264d736f4c7cf169490794dee3d8a6f3762d26056e

See more details on using hashes here.

Supported by

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