Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
The NetApp Astra Control Python SDK is designed to provide guidance for working with the NetApp Astra Control API.
You can use the astraSDK/
library out of the box, and as a set of example recommended code and processes, "cookbook" style. The toolkit.py
script provides a command line interface to interact with Astra Control with built-in guardrails, and since it utilizes astraSDK/
it can provide additional context around the requirements of the astraSDK classes.
When using toolkit.py
/actoolkit
in automation, it is highly recommended to tie your workflows to a specific tag or release (as functionality may change over time), and be sure to thoroughly test all workflows to ensure expected behavior.
Note: Support for all components of the Astra Control Python SDK is exclusively handled in a best effort fashion by the community via GitHub issues, and is not supported by NetApp Support. Use of this SDK is entirely at your own risk.
The NetApp Astra Control SDK can be utilized three different ways, depending upon your use case:
actoolkit
).pip install
command results in toolkit.py (as actoolkit
) being available in the user's PATH and all python-related dependencies installed. It also installs the astraSDK/
library for use in custom scripts.This Python SDK Installation video walks through all three use cases / installation methods.
For the administrator use case with the prepared Docker image:
For the DevOps / GitOps use case with the python package (actoolkit):
For the developer use case or to manually install the NetApp Astra Control SDK:
az
) 2.25.0+ or Google Cloud SDK (gcloud
) 345.0.0+ or AWS CLI (aws
) 1.22.0+No matter the method of installation, the SDK authenticates by reading in the config.yaml
file from the following locations (in order):
~/.config/astra-toolkits/
/etc/astra-toolkits/
ASTRATOOLKITS_CONF
Again, no matter the method of installation, the config.yaml
file should have the following syntax:
headers:
Authorization: Bearer <Bearer-Token-From-API-Access-Page>
uid: <Account-ID-From-API-Access-Page>
astra_project: <Shortname-or-FQDN>
verifySSL: <True-or-False>
This Astra Control API Credentials video walks through creating the config.yaml
file, or follow the instructions below.
Create (if using actoolkit
) or edit (if using the git repo) the config.yaml
file in one of the above mentioned locations with your NetApp Astra Control account information:
Authorization: Bearer
: Your API tokenuid
: Your Astra Control Account IDastra_project
: Your Astra Control instance (shortnames get astra.netapp.io appended to them, FQDNs [anything with a .
] are used unchanged)verifySSL
: True or False, useful for self-signed certs (if this field isn't included it's treated as True)You can find this information in your NetApp Astra Control account profile. Click the user icon in the upper right-hand corner, then choose API Access from the drop-down menu which appears.
Copy and paste your Astra Control account ID into the config.yaml
file.
To get your API token, click + Generate API token. Generate a new API token, then copy and paste the token into the config.yaml
When you are done, the config.yaml
looks like:
headers:
Authorization: Bearer thisIsJustAnExample_token-replaceWithYours==
uid: 12345678-abcd-4efg-1234-567890abcdef
astra_project: astra.netapp.io
verifySSL: True
Launch the prepared Docker image. Docker will automatically download the image if you don't already have it on your system.
docker run -it netapp/astra-toolkits:latest /bin/bash
NOTE: From this point forward, you will be working in the Docker container you just launched.
Set up your kubeconfig to successfully run kubectl commands against your cluster with the appropriate command (e.g. export KUBECONFIG=/path/to/kubeconfig
, gcloud container clusters get-credentials
, az aks get-credentials
, or aws eks update-kubeconfig
).
Configure your config.yaml
as detailed in the authentication section.
Since the actoolkit python package is bundled with the Docker image, you can immediately use it to interact with Astra Control:
actoolkit list clusters
Alternatively, you can also follow the manual installation steps to clone the git repo and optionally make modifications to the code base, all while not having to worry about software dependencies.
Install actoolkit with the following command:
python3 -m pip install actoolkit
Configure your config.yaml
as detailed in the authentication section.
You can now use actoolkit
to invoke the NetApp Astra Control SDK. For example, list your Astra Control Kubernetes clusters with the command:
actoolkit list clusters
Additionally, the astraSDK/
library is available for import for use when creating custom scripts:
>>> import astraSDK
>>> print(astraSDK.clusters.getClusters(output="table").main())
+----------------------+--------------------------------------+---------------+----------------+
| clusterName | clusterID | clusterType | managedState |
+======================+======================================+===============+================+
| uscentral1-cluster | 0412fd41-51b8-478a-b055-0bd50e34b1fe | gke | managed |
+----------------------+--------------------------------------+---------------+----------------+
| prod-cluster | c69d8281-d4ea-4902-b03e-0c39c7da4543 | gke | managed |
+----------------------+--------------------------------------+---------------+----------------+
Clone the NetApp Astra Control SDK repo.
git clone https://github.com/NetApp/netapp-astra-toolkits.git
Move into the repo directory.
cd netapp-astra-toolkits
Run the following commands to add the required Python elements:
python3 -m venv toolkit
source toolkit/bin/activate
pip install -r requirements.txt
Configure your config.yaml
as detailed in the authentication section.
You can now use ./toolkit.py
to invoke the NetApp Astra Control SDK. For example, list your Astra Control Kubernetes clusters with the command:
./toolkit.py list clusters
See the documentation for more information.
FAQs
Toolkit and SDK for interacting with Astra Control
We found that actoolkit 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 News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.