
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Python OAUTH 2.0 generic Client used for Backend Application strategy authentication on European XFEL Web Applications
Python library responsible for managing users authentication using OAUTH 2.0 Client Backend Application strategy (from non web software to web Oauth2 providers)
Repository:
Dependencies:
Python project """"""""""""""
1.1. For OS X distributions::
1.1.1. Homebrew
brew install python3
1.1.2 Port
sudo port install python36
sudo port select --set python3 python36
sudo port install py36-pip
sudo port select --set pip pip36
1.2. For Linux distributions::
sudo apt-get update
sudo apt-get install python3.9
2. Make oauth2_xfel_client library available in your python environment
2.1. Install it via pip::
# Install dependencies from local wheels files
pip install . --no-index --find-links ./external_dependencies/
# Install dependencies from the pypi
pip install .
Installing it will place two folders under the current Python installation site-packages folder:
oauth2_xfel_client
with the sources;oauth2_xfel_client-6.1.1.dist-info/
with Wheels configuration files.To identify your Python site-packages folder run::
python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
To use this project you need to import it::
from oauth2_xfel_client import Oauth2ClientBackend
Connection to the Oauth2Client (MyMdC example)::
from oauth2_xfel_client import Oauth2ClientBackend as Oauth2Client
user_id = 'PUT_HERE_YOUR_CLIENT_KEY' user_secret = 'PUT_HERE_YOUR_SECRET_KEY'
user_email = 'luis.maia@xfel.eu'
token_url = 'https://in.xfel.eu/metadata/oauth/token' refresh_url = 'https://in.xfel.eu/metadata/oauth/token' auth_url = 'https://in.xfel.eu/metadata/oauth/authorize' scope = '' base_api_url = 'https://in.xfel.eu/metadata/api/'
oauth_client_valid = Oauth2Client(client_id=user_id, client_secret=user_secret, scope=scope, token_url=token_url, refresh_url=refresh_url, auth_url=auth_url, session_token=None, max_retries=3, timeout=12, ssl_verify=True)
Interaction with the oauth2Client:
2.1 Example data_group_types::
current_token = oauth_client_valid.get_session_token()
When developing, and before commit changes, please validate that:
All tests continue passing successfully (to validate that run pytest)::
cd oauth2_xfel_client
pip install . -U --upgrade-strategy eager
pip install '.[test]' -U --upgrade-strategy eager
pytest
OAUTHLIB_INSECURE_TRANSPORT=1 pytest
pytest --cov oauth2_xfel_client --cov-report term-missing
Code keeps respecting pycodestyle code conventions (to validate that run pycodestyle)::
pycodestyle .
To generate all the wheels files for the dependencies, execute::
pip wheel --wheel-dir=./external_dependencies . pip wheel --wheel-dir=./external_dependencies --find-links=./external_dependencies .
Check that you have the desired dependency versions in external_dependencies
folder, since no versions are now set in setup.py
.
To register this python library, the following steps are necessary::
# Install twine
python -m pip install --upgrade twine
# Generates source distribution (.tar.gz) and wheel (.whl) files in the dist/ folder
python setup.py sdist
python setup.py bdist_wheel
# Upload new version .egg and .whl files
twine upload dist/*
# In case a test is necessary, it is possible to test it against test.pypi.org
twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose
FAQs
Python OAUTH 2.0 generic Client used for Backend Application strategy authentication on European XFEL Web Applications
We found that oauth2-xfel-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.