Kerberos Authentication in Python/Pyspark using keytab - python

I'm trying to connect to Hadoop/Hive from Intelliji using keytab based authentication in python/pyspark. I use statement in scala to get kerberos ticket but is there any similar way in Python as well to do kerberos authentication.
UserGroupInformation.loginUserFromKeytab(principal, keytabPath)

Related

OKTA AWS CLI Using Python to Connect to Athena

My company uses Okta Authentication for all corporate applications. Is there a way or a workaround to circumvent the OKTA Authentication while connecting to AWS Athena? I'm trying to automate a Python Script that connects to Athena and it requires me to Okta Verify every time after the short-lived token expires. However, Google Suite (Docs, Sheets, Drive) API's doesn't require this type of AUTH verification method and it never requests one when I connect Python to Google Suites although our Google Suite use Okta Authentication for login.
Any help or references would be much appreciated. Thank you!

openid connect provider and client example in django

I need to build a Django web-app. My web-app needs to support authentication and authorization using OpenID Connect. It is my first time doing this. Is there a free Identity Provider to test my application or do I need to write the provider and the client? My task is to write only the client that connects to the provider. An example would be great or some course/tutorial I can use to learn how to do this.
Maybe there are no good examples in Django but I know ASN.NET and Java so those examples could inspire me as well.
There are a bunch of OpenID Connect providers you can use to test your client: you can sign up for a free Auth0 or Okta developer sandbox, download and run IdentityServer locally, or try the OAuth2 Playground.
As for writing the client. Please don't write your own. There are a list of libraries from the OpenId Foundation. I've used pyoidc for a non Django application, you could hook that in to your app, or use one of the Django specific OpenID Connect libraries.
checkout this example using both provider (django app using django-oidc-provider package) and client (using JS).
https://django-oidc-provider.readthedocs.io/en/latest/sections/examples.html

github3.py login using ssh keys

Is there a way to use github3.py python library to access github with a SSH key?
I'm trying to create a service that writes on some repositories using a machine user for security reasons.
Unfortunately, the GitHub API doesn't provide a way to authenticate with SSH keys. Thus, github3.py provides no way to login using SSH keys.

How to set up dsetool authentication for Solr?

I've been playing around with and am new to Datastax Enterprise, and I was trying to use the dsetool create_core command to generate a Solr schema automatically for my table in Cassandra. I am using Datastax Enterprise 4.6.5.
I saw in the docs that there was authentication for dsetool using JMX or Kerberos. Right now, I'm using internal authentication, but dsetool asks for HTTP authentication if I try to run the create_core command.
I don't know anything about JMX or Kerberos, and I'm also new to Cassandra and Solr, so I have 3 questions.
Which protocol should I be using to be able to talk to Solr with authentication?
Can I or should I be using internal authentication at all if I use one of the two protocols above?
How does using one of these protocols change how I talk to Cassandra or Solr, for example, using the Datastax python connector or a Solr python client?
Because dsetool create_core is not supported with internal authentication, you can use the Solr HTTP API directly to create your core. Try something like the following from your command line:
curl "http://localhost:8983/solr/admin/cores?action=CREATE&name=<keyspace>.<table>&generateResources=true"

OpenStack Python Novaclient does not require authentication

I'm using OpenStack Diablo on RHEL6 with packages from GridDynamics.
Everything seems to work with the EC2 api, but when using python-novaclient, the system just allow access to any api commands regardless of the authentication provided.
See https://github.com/masom/Puck/blob/master/server/plugins/virtualization/nova.py#L42
I am not using Keystone for authentication (Waiting for essex to be released).
Why is nova blindly allowing anyone to issue api commands regardless of the authentication data provided?
Turns out /etc/nova/api-paste.ini had noauth and ec2noauth
Moving to the deprecated auth (not using keystone) by changing noauth to auth did it.

Categories

Resources