akamai / cli-api-gateway

Apache License 2.0
4 stars 5 forks source link

Privacy update not working #8

Open per-garden opened 2 years ago

per-garden commented 2 years ago

When using akamai-cli in one of our projects we try to automate handling. Setting endpoint resources to public/private, does not seems to work though.

Supposedly one should be able to write something like "akamai api-gateway privacy-add --endpoint=764997 --version=30 -public --resource /performance". That would be to make the resource "/performance" public. Nor that, nor any tweaked calls (e.g. using JSON) ever result in anything but "json: cannot unmarshal object into Go struct field APIPrivacyResource.methods of type []string" though. What is wrong? I'm using akamai-cli 1.4.1.

Having downloaded cli-api-gateway source code, I get as far as api_privacy_settings.go, where privacy settings seem not to be read correctly.

In api_privacy_settings.go the call

rep := &APIPrivacySettings{}

in GetAPIPrivacySettingsGetAPIPrivacySettings seems to return nothing and an error is thrown. This looks very much like a configuration error. What configuration is missing?

For the complete, compiled binary akamai-cli, I use an .edgerc with an API-client ID. I checked this ID again at control.akamai.com/apps/identity-management. It looks OK. And it works fine to e.g.upload API definitions. What is wrong?

(Issue initially reported as https://github.com/akamai/cli/issues/147)

per-garden commented 2 years ago

Is anyone active here?

securitylevelup commented 2 years ago

Hi per-garden, thanks for opening this issue. This was brought to my attention last week by a colleague of min.

Looking into this, it indeed seems that the API Privacy settings are not properly set/passed on through the CLI. I am contacting our core CLI team to see who can look into this issue and fix it.

The only way to solve this for now would be using a different tools like the Akamai API Gateway API or using the UI to make this change.

per-garden commented 2 years ago

Great that someone finally picked this up. Thanks!

per-garden commented 2 years ago

Are there any updates on this?