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

Add OIDC authentication #1130

Merged
merged 4 commits into from
Oct 24, 2024
Merged

Add OIDC authentication #1130

merged 4 commits into from
Oct 24, 2024

Conversation

tkirill
Copy link
Contributor

@tkirill tkirill commented Jun 14, 2024

DDCORE-8610

  • Add UseOidc method to turn on OIDC authentication. Technically that just changes value of the Authorization header from DiadocToken scheme to Bearer scheme.
  • Add overload with authToken argument to methods that haven't had them. These methods don't require DiadocToken on server side. But it will be required to pass authToken with OIDC. Both overloads will work with DiadocToken without any problems. Checked methods in public client types: IDiadocApi, DiadocHttpApi, IDocflowApi, DocflowHttpApi, IComDiadocApi.
  • Add a test that enforces "overload with authToken must exist" rule on public client types.
  • Later, after public announcement about OIDC, overloads without authToken argument will be marked obsolete.
List of methods that don't require DiadocToken on server

The list was builded automatically using reflection. It contains all actions in server app with [SkipTokenValidation] attribute.

➖ -- overload is not required, because the method isn't going to be used with OIDC
🚶 -- overload is not required because the method is gone (API responds with HTTP 410)
Ⓜ️ -- the methods missed from the client and overload wasn't added too
✅ -- the method either already had overload with authToken or such overload was added

  • ➖ Authenticate
  • Ⓜ️ Devices
  • ✅ GenerateAcceptanceCertificateXmlForSeller
  • ✅ GenerateInvoiceXml
  • ✅ GenerateTorg12XmlForSeller
  • ✅ GenerateUniversalTransferDocumentXmlForSeller
  • ✅ GetBox
  • Ⓜ️ GetBoxesByInnKpp
  • Ⓜ️ GetBoxInfo
  • 🚶 GetExternalServiceAuthInfo
  • ✅ GetOrganization
  • ✅ GetOrganizationsByInnKpp
  • ✅ GetOrganizationsByInnList
  • 🚶 GetRecognized
  • ✅ ParseAcceptanceCertificateBuyerTitleXml
  • ✅ ParseAcceptanceCertificateSellerTitleXml
  • ✅ ParseInvoiceXml
  • ✅ ParseRevocationRequestXml
  • ✅ ParseRussianAddress
  • ✅ ParseSignatureRejectionXml
  • ✅ ParseTorg12BuyerTitleXml
  • ✅ ParseTorg12SellerTitleXml
  • ✅ ParseUniversalCorrectionDocumentBuyerTitleXml
  • ✅ ParseUniversalCorrectionDocumentSellerTitleXml
  • ✅ ParseUniversalTransferDocumentBuyerTitleXml
  • ✅ ParseUniversalTransferDocumentSellerTitleXml
  • 🚶 Recognize
  • Ⓜ️ SendMessage
  • Ⓜ️ PostDraft
  • ➖ V2/Authenticate
  • ➖ V2/AuthenticateConfirm
  • Ⓜ️ V2/ParseRussianAddress
  • ➖ V3/Authenticate
  • Ⓜ️ VerifyThatUserHasAccessToAnyBox

@AnatoliDubko AnatoliDubko self-requested a review June 27, 2024 14:18
@tkirill tkirill force-pushed the DDCORE-8610-oidc branch 2 times, most recently from 453019b to 8d11d6b Compare July 11, 2024 12:52
@tkirill tkirill merged commit 1eb647b into master Oct 24, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants