Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve current documentation for SQAaaS API #16

Open
wants to merge 2 commits into
base: secure_services
Choose a base branch
from

Conversation

samuelbernardolip
Copy link
Collaborator

@samuelbernardolip samuelbernardolip commented Dec 21, 2020

Add some references and how to test the API.

@@ -107,7 +107,8 @@ A new Docker controller image has to be built to add the formerly modified
included in this template (njs module & `oauth2_token_introspection` folder).

You just need to follow the instructions in the `ingress-nginx` repository and
run something similar to the following:
review the [development guidelines](https://kubernetes.github.io/ingress-nginx/development/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

broken link

Copy link
Collaborator Author

@samuelbernardolip samuelbernardolip Dec 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://kubernetes.github.io/ingress-nginx/development/
Just accessed this url and it opens with following page:
https://ibb.co/8z24JLY

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, works

### Testing the API
Get the refresh and access token from [EGI Check-in AAI dev](https://aai-dev.egi.eu/fedcloud/) using Fedcloud web interface. After the OIDC validation in web interface, the access token can be generated using the provided command that should appear there with the following syntax:
```
curl -X POST -u '<client id>':'<client secret>' -d 'client_id=<client id>&client_secret=<client secret>&grant_type=refresh_token&refresh_token=<refresh token>&scope=openid%20email%20profile' 'https://aai-dev.egi.eu/oidc/token' | python -m json.tool;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you need the <refresh-token>, but there is no hint about how to get it. If it is related to the outcome of the former "OIDC validation in the web interface" statement, we should indicate how to tackle this last action

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right is not explicit...
When using the web interface it lists multiple properties as the result and one of them is the . They also provide the complete oneliner with all fields already fulfilled.
@orviz Can you test the suggested procedure and see if any other detail is missing?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be good to add a screenshot:

image

BTW didn't work with Chromium, only with Firefox. If you can reproduce this, it should be helpful to document the issue

```

The curl command returns the JSON web token (JWT) that have the keys named `access_token` and `token_type` must have the value "Bearer".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove newline

The curl command returns the JSON web token (JWT) that have the keys named `access_token` and `token_type` must have the value "Bearer".


Finally, to test the API the following commands should return http 200 code for each deployed endpoint. The following examples are specific for current EOSC Synergy deployment.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe emphasize the last sentence?

curl -X GET -IH 'Authorization: Bearer <access_token>' https://api-staging.sqaaas.eosc-synergy.eu/v1/ui/
```

* Development (note that in this case v1 is surpressed since api-dev is only a mock server):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"suppressed"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants