🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

emr-serverless-customauth

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emr-serverless-customauth

EMR Serverless Custom Authenticator for spark magic kernel.

1.0.1
Maintainers
1

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.

  • 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"
  },
  ....
}
  • 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.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts