microsoft / kiota

OpenAPI based HTTP Client code generator
https://aka.ms/kiota/docs
MIT License
2.83k stars 194 forks source link

Kiota needs validate the security scheme and let the user know the only accepted methods are API Key, OAuth, HTTP+Bearer Token and OpenId Connect #5071

Closed maisarissi closed 1 week ago

maisarissi commented 1 month ago

If the security scheme is provided in the OpenAPI description, Kiota should validate whether the auth type is supported when creating the API Plugins.

The only auth supported for now when creating an API Plugin are API Key, OAuth, HTTP+Bearer Token and OpenId connect. Also, multiple auth in one operation is yet not supported.

If the security scheme is provided and the auth type is not supported, Kiota should thrown an error.

Superseeded by #5070.

Acceptance Criteria

baywet commented 1 month ago

I'm assuming this is "just an epic" and there's no actual work to be done here. Correct?

maisarissi commented 1 month ago

I wouldn't say a epic, because this is under the "Enabling authenticate API calls from Kiota API plugins" epic 😄 But yes, implementing the other issues mentioned above and making sure we are adding the "tasks" I mentioned here, this can be closed when the others are done.

petrhollayms commented 4 weeks ago

We did not have the criteria specified as a requirement in other stories, so it would be a complementary story to #5070 . I added it there to have it on one place now, also as we need to throw an error for unknown/unsupported values anyway.

petrhollayms commented 1 week ago

Done in Kiota and for CLI. VS Code extension is post-GA now, tracked separately, so closing this issue here.

maisarissi commented 1 week ago

Hey @petrhollayms . The validation and creating the right auth scheme in VS Code extensions is not post-GA. Post-GA is only providing a way for folks to add auth info when they are not available in the OpenAPI description (the UI implementation of --authentication-type and --authentication-reference-id).