OAI / OAI/sig-security

Support for GNAP

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
6
Forks
3
Avg merge
1h 54m
Merged PRs (30d)
1

Description

Support for the GNAP draft specification would require the specification of the algorithms, key types, and required covered content for a signature. The following examples show what a possible syntax could look like for the new OAS security model proposed in OAI/OpenAPI-Specification#2582.

GNAP's access arrays are similar to RAR (#7) and the proofing section would need to reference other technologies like HTTP Signatures (#8)

This example shows how it could be defined for an example API using HTTP signature bound requests (and tokens) and a

components:
  securitySchemes:
    photoApi:
      type: gnap
      credentials:
      - in: header
        name: authorization
        format: ^[G|g][N|a][A|a][P|p] (.*)$
      config:
        interact:
          start:
          - redirect
          - user_code
          finish: redirect
        access:
        - type: photo-api
          actions:
          - read
          - write
          - dolphin
          locations:
          - <api endpoint url>
          datatypes:
          - image
          - metadata
        - type: bank-api
          actions:
          - read
          locations:
          - <api endpoint url>
          identifier: <account id>
          datatypes:
          - account
        proof:
          method: httpsig
          alg: rsa-pss-sha512
          keyid: <your key id here>
          coveredComponents:
          - @method
          - content-digest
          - content-type
          - target-uri
          requiredParameters:
          - nonce
          - created

As I'm not sure how to show placeholder values, I'm using things like <your key id> here.

This proposed syntax is just one possible idea, and I'm looking for feedback on how this could be made to fit the OAS model better.

Addresses #6

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the GNAP draft specification and the proposed OAS security model in OAI/OpenAPI-Specification#2582. Compare the example syntax with the related RAR (#7) and HTTP Signatures (#8) issues; done would require an agreed design for representing GNAP access, proof, algorithms, key types, and covered content.

Written by the indexing model from the issue text.

Assessment

Domain
api, authorization, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.