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

API enhancement #41

Closed
0xdiba opened this issue Jul 16, 2015 · 3 comments
Closed

API enhancement #41

0xdiba opened this issue Jul 16, 2015 · 3 comments

Comments

@0xdiba
Copy link
Contributor

0xdiba commented Jul 16, 2015

Provide an API that can be queried and provide direct results to the caller.

@jvehent
Copy link
Contributor

jvehent commented Aug 3, 2015

A few endpoints to start with. All endpoints must follow CRUD methodology and return intelligible HTTP error codes.

  • POST /api/v1/scan?target=example.net
    perform a full scan of target https://example.net
  • GET /api/v1/results?target=example.net
    retrieve a JSON document from the database with the results for example.net. If nothing is found, return a 404.
  • GET /api/v1/certificate?target=example.net&raw=false
    returns a JSON of the interpreted certificate of example.net (or a 404). If &raw=true is set, return the raw base64 as plain text (no json).
  • GET /api/v1/search?sha1=abcdef&show=child&limit=100&offset=300
    This would be a more complex search API that would be extended in the future. In the example above, we're listing the children of a root or intermediate cert that has sha1 abcdef, only returning 100 results, and skipping the first 300, for pagination. That type of query would be used by the platform security team to list the certificates impacted by revoking a given intermediate cert, for example via OneCRL. (cc @mozmark).

@jvehent
Copy link
Contributor

jvehent commented Aug 3, 2015

On the authentication side: all API calls should require an oauth2 token for now. We can decide to open some endpoints publicly in the future.

@jvehent
Copy link
Contributor

jvehent commented Dec 3, 2015

Let's close this for now and create separate issues for specific API endpoints and improvements.

@jvehent jvehent closed this as completed Dec 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants