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

feat: OpenID Connect Federation 1.0 #61

Merged
merged 33 commits into from
Aug 5, 2023
Merged

feat: OpenID Connect Federation 1.0 #61

merged 33 commits into from
Aug 5, 2023

Conversation

peppelinux
Copy link
Member

@peppelinux peppelinux commented Jul 30, 2023

covers #52

this branch contains the federation features that must be integrated in the trust evaluation methods of the backend

tasks:

Resources to be integrated in this PR

The test files to be migrated in this project are the ones listed below

mocked responses

Allows to use the http client for requesting several EC and ES and collecting the trust chain we desire for tests.
https://github.com/italia/spid-cie-oidc-django/blob/main/spid_cie_oidc/authority/tests/mocked_responses.py

this is required as it is, just remove the django refs/deps

https://github.com/italia/spid-cie-oidc-django/blob/main/spid_cie_oidc/entity/tests/test_09_trust_chain.py

this requires the file trust_chain_operations.py (TO BE MIGRATED and integrated with the storage interface)

https://github.com/italia/spid-cie-oidc-django/blob/main/spid_cie_oidc/authority/tests/test_02_trust_anchor_intermediary.py#L272

Demo

Here a tutorial for making an onboarding demo with a fully working trust anchor
https://github.com/italia/spid-cie-oidc-django/tree/main/examples/wallet_trust_anchor/tutorial

@peppelinux peppelinux requested a review from PascalDR July 30, 2023 11:08
@peppelinux peppelinux marked this pull request as draft July 31, 2023 13:40
@Pyscho79 Pyscho79 added this to the 0.3.0 milestone Jul 31, 2023
@PascalDR PascalDR linked an issue Jul 31, 2023 that may be closed by this pull request
@peppelinux peppelinux changed the base branch from main to dev July 31, 2023 17:28
@peppelinux
Copy link
Member Author

peppelinux commented Jul 31, 2023

The test files to be migrated in this project are the ones listed below

mocked responses

Allows to use the http client for requesting several EC and ES and collecting the trust chain we desire for tests.
https://github.com/italia/spid-cie-oidc-django/blob/main/spid_cie_oidc/authority/tests/mocked_responses.py

this is required as it is, just remove the django refs/deps

https://github.com/italia/spid-cie-oidc-django/blob/main/spid_cie_oidc/entity/tests/test_09_trust_chain.py

this requires the file trust_chain_operations.py (TO BE MIGRATED and integrated with the storage interface)

https://github.com/italia/spid-cie-oidc-django/blob/main/spid_cie_oidc/authority/tests/test_02_trust_anchor_intermediary.py#L272

@PascalDR @salvatorelaiso ^

@peppelinux
Copy link
Member Author

@PascalDR this is the mongodb collection that me and you have produced in pair

This must be handled in the current storage engine (mongodb) and also requires methods in the backend to fetch/store and update the definitions (TA and trust chains)

{
  "trust": {
    "anchors": {
       "https://ta.example.org": {
          "federation": {
            "entity_configuration": "str(EC), -> EC contains the federation entity public keys,
            "exp": datetime
         },
          "x509": {
            "pem": str(PEM) -> contains public keys,
            "exp": datetime
       }
    },
    "chains": {
       "https://wallet_provider.example.org": {
          "federation" : {
            "chain": ARRAY[EC,ES,ES],
            "exp": datetime,
            "update": datetime
          }
          "x509": {
             "x5c": ARRAY[bytestring(DER), bytestring(DER), bytestring(DER)] -> contains public keys,
            "exp": datetime
       }
    }
  }
}

@peppelinux peppelinux marked this pull request as ready for review August 2, 2023 21:18
PascalDR and others added 16 commits August 2, 2023 23:19
* feat: implemented property is_valid

* test: added test for property is_valid

* fix: fixed import

* feat: created gen_static_trustchain

* feat: added ESSchema validation and initial implementation of

* fix: changed signature algorithm

* fix: changed signature alg

* fix: removed print

* fix: fixed imports

* feat: specialized errors

---------

Co-authored-by: Pasquale De Rose <pasquale.de.rose@it.ey.com>
@peppelinux peppelinux merged commit 16cc2ce into dev Aug 5, 2023
@peppelinux peppelinux deleted the fed branch September 5, 2023 10:59
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.

OpenID Connect Federation 1.0 unit tests
4 participants