Skip to content

Commit

Permalink
Fix bug #4 preventing tenant command to work with AccountSwitchKey
Browse files Browse the repository at this point in the history
  • Loading branch information
bitonio committed Apr 27, 2022
1 parent a6f87a9 commit fdbf610
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,19 @@ Running this will run the system `python setup.py` automatically.
### API User and configuration file

On [Akamai Control Center](https://control.akamai.com), make sure you create an API user
with the _ETP Configuration API_ (`/etp-config`) with read-write permission.
with the _ETP Configuration API_ (`/etp-config`) with `READ-WRITE` permission.

Upon user credential creation, you'll get a `.edgerc` file with 4 parameters.
You'll need to add a 5th line with the `etp_config_id`.

The value of the parameter is a integer you can obtain by navigating in Akamai Control Center:

- Select Enterprise Threat Protector from the left menu
- Select Utilities
- Select ETP Client tab
- Locate _customer identifier_ on the right
- Select **Enterprise Center** from the left menu
- Navigate to **Threat Protection**
- Open **Locations** > **Locations**
- Extract the ETP Config ID integer from the URL as pictured:

<img src="docs/etp-config-id.png" width="100%">

Example of `.edgerc` file:
```
Expand Down
4 changes: 2 additions & 2 deletions bin/akamai-etp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ from requests.compat import urljoin
from akamai.edgegrid import EdgeGridAuth, EdgeRc
from config import EdgeGridConfig

__version__ = "0.3.7"
__version__ = "0.3.8"

#: Window span in ad-hoc mode, default is 15 min
span_duration_min = 15
Expand Down Expand Up @@ -395,7 +395,7 @@ class tenant:
@staticmethod
def _get_all():
path = '/etp-config/v3/configs/{configId}/tenants'.format(configId = config.etp_config_id)
resp = session.get(urljoin(baseurl, path))
resp = session.get(urljoin(baseurl, path), params=build_params())
if resp.status_code != 200:
sys.stderr.write(f"Error fetching tenants:\n{resp.text}\n")
sys.exit(2)
Expand Down
2 changes: 1 addition & 1 deletion cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"commands": [
{
"name": "etp",
"version": "0.3.7",
"version": "0.3.8",
"description": "Akamai CLI for Enterprise Threat Protector"
}
]
Expand Down
Binary file added docs/etp-config-id.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fdbf610

Please sign in to comment.