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

Annotations type in Resource Scheme seems wrong #229

Open
zoltan-magyar opened this issue Dec 7, 2023 · 0 comments
Open

Annotations type in Resource Scheme seems wrong #229

zoltan-magyar opened this issue Dec 7, 2023 · 0 comments
Labels

Comments

@zoltan-magyar
Copy link

Summary

I am currently using the specification to generate TypeScript interfaces with openapi-typescript. Unfortunately, I stumbled upon a problem with the specification. It seems that annotations are in fact not of type string[], they are rather an object in application/json Content-Type.

Steps to Reproduce

  1. Genrate the OSS OpenAPI spec with version 5.3.1
  2. Install Conjur OSS with the quickstart (latest Docker image: 1.20.1-4405)
  3. Upload a test policy with an annotation (found on CyberArk Blog):
- !policy
  id: store-n-fetch
  annotations:
    purpose: demonstrate storing & fetching secrets using Conjur
  body:
    - !layer
    - !host_factory
      layers: [ !layer ]
    - !variable secret
    - !permit
      resource: !variable secret
      privilege: [ read, execute ]
      role: !layer
  1. Fetch the policy resource through https://localhost:8443/resources/{account}/policy/store-n-fetch
  2. Check annotations in the response

Expected Results

An annotations field with the correct type.

Actual Results

The JSON I get back is:

{
    "created_at": "2023-11-29T03:52:06.661+00:00",
    "id": "default:policy:store-n-fetch",
    "owner": "default:user:admin",
    "policy": "default:policy:root",
    "permissions": [],
    "annotations": [
        {
            "name": "purpose",
            "value": "demonstrate storing & fetching secrets using Conjur",
            "policy": "default:policy:root"
        }
    ],
    "policy_versions": []
}

Version/Tag number

  • Conjur: 1.20.1-4405
  • OpenAPI Spec version: 5.3.1

Environment setup

  • Conjur running in Docker using the quickstart (latest Docker image: 1.20.1-4405)
  • OpenAPI OSS spec generated following the instructions on the tag 5.3.1 of this repo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant