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 be1-go implemention of federation authentication part #1827

Merged
merged 55 commits into from
May 29, 2024

Conversation

arnauds5
Copy link
Collaborator

@arnauds5 arnauds5 commented Apr 24, 2024

Add handler for federation message that do the following (not including verification of sender/etc):

  • handleRequestChallenge: generate a new challenge, store it in db, broadcast it
  • handleExpect: verify that the challenge exist in db, then store the expect
  • handleInit: store the init, create a connection to the other server, then send the challenge to it
  • handleChallenge: verify that a matching expect exist in db, remove the challenge from db to avoid reuse, create a result message, store it in db, send the result to the other server, broadcast the result locally
  • handleResult: verify that a matching init exist in db, store the result, broadcast the result locally

The channel "/root/<loa_id>/federation" is used for all the current messages.




The following description was from before the go refactor for the code with last commit: c6b307ff6ee4b4822514ac890e6ca2a2698e091d

Implements some message handlers of the federation authentication (FederationResult is being done by Florentin)
  • processChallengeRequest: generate a new challenge and send it back to the organizer
  • processFederationExpect: Store informations about the other organization, with the expected challenge.
  • processFederationInit: Store informations about the other organization, initiate a ws connection to the other server, then publish the FederationChallenge on the other server's federation channel
  • processFederationChallenge: check that the challenge is valid, send federation result

A channel "/root/<lao_id>/federation" is created when a lao is created.

Informations about the other organization are stored in a map, such that it could be possible to handle multiple organizations. The public key of the organizer of the other lao is used as the key.

The challenge field of the json schema of FederationInit was changed from only a challenge to a general message containing a FederationChallenge. So that it's possible to send a FederationChallenge signed by the organizer (not the server)

@arnauds5 arnauds5 self-assigned this Apr 24, 2024
Copy link

Pull reviewers stats

Stats of the last 30 days for popstellar:

User Total reviews Time to review Total comments
K1li4nL
🥇
5
▀▀▀
4d 22h 27m
▀▀
16
▀▀▀▀
simone-kalbermatter
🥈
3
▀▀
3d 2h 43m
11
▀▀▀
matteosz
🥉
3
▀▀
1d 11h 55m
6
▀▀
arnauds5
2
13h 26m
0
t1b00
2
7d 16h 20m
▀▀▀
4
onsriahi14
2
5d 5h 47m
▀▀
1
sgueissa
1
25m
0
MariemBaccari
1
16h 14m
0
DanielTavaresA
1
3d 22h 24m
2
⚡️ Pull request stats

@1florentin 1florentin self-assigned this Apr 29, 2024
@arnauds5 arnauds5 marked this pull request as ready for review May 1, 2024 16:17
@arnauds5 arnauds5 requested a review from a team as a code owner May 1, 2024 16:17
@arnauds5 arnauds5 requested a review from 1florentin May 1, 2024 16:19
Copy link

sonarcloud bot commented May 27, 2024

Quality Gate Passed Quality Gate passed for 'PoP - PoPCHA-Web-Client'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

sonarcloud bot commented May 27, 2024

Quality Gate Passed Quality Gate passed for 'PoP - Be2-Scala'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

sonarcloud bot commented May 27, 2024

Quality Gate Failed Quality Gate failed for 'PoP - Be1-Go'

Failed conditions
36.7% Coverage on New Code (required ≥ 65%)

See analysis details on SonarCloud

Copy link

sonarcloud bot commented May 27, 2024

Quality Gate Passed Quality Gate passed for 'PoP - Fe1-Web'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

sonarcloud bot commented May 27, 2024

Quality Gate Passed Quality Gate passed for 'PoP - Fe2-Android'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Collaborator

@sgueissa sgueissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LVGTM I have nothing to say you have perfectly fit your feature in the new backend with the same convention as we did. GGWP

Copy link
Contributor

@emonnin-epfl emonnin-epfl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@MariemBaccari MariemBaccari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved blindly because of time constraints.

@MariemBaccari MariemBaccari added this pull request to the merge queue May 29, 2024
Merged via the queue into master with commit afc8c11 May 29, 2024
17 of 18 checks passed
@MariemBaccari MariemBaccari deleted the work-be1-arnauds5-federation-authentication_a branch May 29, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants