cli-edgeworkers icon indicating copy to clipboard operation
cli-edgeworkers copied to clipboard

EW CLI auth does not support wildcard domains nor propertyId

Open guillaume-fr opened this issue 2 years ago • 1 comments

Edgeworkers CLI does not allow generating a token for a wildcard domain.

akamai ew auth '*.example.com' We get the following error ERROR: Creating auth token with secret is deprecated with version CLI 1.1.0. Please use your host name to create an authentication token.

We should update or remove isValidDomain(hostName) check https://github.com/akamai/cli-edgeworkers/blob/master/src/edgeworkers/ew-cli-main.ts#L414

This should allow wildcard domain or propertyId as it is supported by API: https://techdocs.akamai.com/edgeworkers/reference/post-secure-token

guillaume-fr avatar Mar 14 '22 13:03 guillaume-fr

Hey @guillaume-fr -- thanks for raising this ticket and the PR. Sorry for the late reply here, I was away last week, but I have some info from an engineer on our team who looked into this problem.

Unfortunately this is not something that can be fixed with a CLI change alone. The EW CLI is dependent on calls out to the Akamai OPEN API -- in this case the Edge Secret Store API and components associated with it have an issue where they do not properly handle wildcard domains. We are starting work on an overhaul to this API which should be finished & deployed in the next few months.

I'll leave this ticket open until we have a chance to ensure the new API + the CLI command here works with wildcard domains.

bmatthew avatar Mar 21 '22 13:03 bmatthew