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

matrix-authentication-service: init at 0.7.0 #275057

Merged

Conversation

teutat3s
Copy link
Member

Description of changes

MAS (Matrix Authentication Service) is an OAuth 2.0 and OpenID Provider server for Matrix.

It has been created to support the migration of Matrix to an OpenID Connect (OIDC) based authentication layer as per MSC3861.
One can learn more about Matrix and OIDC at areweoidcyet.com.

https://github.com/matrix-org/matrix-authentication-service/releases/tag/v0.7.0

Vendoring the Cargo.lock is necessary because of a dependency they use: opa-wasm-0.1.0 (pinned to a git repo) .

Future work:
For this to be really useful, a NixOS module will be needed.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Copy link
Member

@NickCao NickCao left a comment

Choose a reason for hiding this comment

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

Actually I've packaged this before, see https://github.com/NickCao/flakes/blob/master/pkgs/matrix-authentication-service/default.nix for some ideas to steal from.

pkgs/by-name/ma/matrix-authentication-service/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/ma/matrix-authentication-service/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/ma/matrix-authentication-service/package.nix Outdated Show resolved Hide resolved
@teutat3s teutat3s force-pushed the init-matrix-authentication-service branch from 0881c99 to 9cd3ca2 Compare December 18, 2023 17:26
@teutat3s
Copy link
Member Author

Actually I've packaged this before, see https://github.com/NickCao/flakes/blob/master/pkgs/matrix-authentication-service/default.nix for some ideas to steal from.

Thanks, I liked your version a lot and stole a lot (if not all 😄).

teutat3s added a commit to teutat3s/nixpkgs that referenced this pull request Dec 18, 2023
Tool to help with the migration of a Matrix Synapse installation to the Matrix Authentication Service.

https://github.com/matrix-org/matrix-authentication-service/tree/main/tools/syn2mas

Related to NixOS#275057
Copy link
Member

@NickCao NickCao left a comment

Choose a reason for hiding this comment

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

I think we also need a nixos test for this, it's a complicated piece of software. Otherwise LGTM.

@teutat3s
Copy link
Member Author

Do you mean a simple version test? In case you think of something more complex, can you point me to an example?

@NickCao
Copy link
Member

NickCao commented Dec 18, 2023

Do you mean a simple version test? In case you think of something more complex, can you point me to an example?

Something like nixos/tests/matrix/synapse.nix, but with MAS instead of builtin authentication.

MAS (Matrix Authentication Service) is an OAuth 2.0 and OpenID Provider
server for Matrix

https://github.com/matrix-org/matrix-authentication-service/releases/tag/v0.7.0

Co-authored-by: Nick Cao <[email protected]>
@teutat3s teutat3s force-pushed the init-matrix-authentication-service branch from 9cd3ca2 to 05e00f6 Compare December 19, 2023 00:49
@teutat3s
Copy link
Member Author

Was missing translations path.

I started something regarding module / test in this branch: teutat3s@287fbae

Lainera pushed a commit to Lainera/nixpkgs that referenced this pull request Dec 20, 2023
Tool to help with the migration of a Matrix Synapse installation to the Matrix Authentication Service.

https://github.com/matrix-org/matrix-authentication-service/tree/main/tools/syn2mas

Related to NixOS#275057
@adamcstephens
Copy link
Contributor

@teutat3s are you planning to add the module to this PR or should we move forward with the package alone?

@teutat3s
Copy link
Member Author

@adamcstephens I'm still working on the module and might be able to look into it some more in the coming week.
For me it would be fine to merge this now and add the module in a separate PR.

Copy link
Contributor

@adamcstephens adamcstephens left a comment

Choose a reason for hiding this comment

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

Result of nixpkgs-review pr 275057 run on x86_64-linux 1

1 package built:
  • matrix-authentication-service

Result of nixpkgs-review pr 275057 run on aarch64-darwin 1

1 package built:
  • matrix-authentication-service

Result of nixpkgs-review pr 275057 run on x86_64-darwin 1

1 package built:
  • matrix-authentication-service

Result of nixpkgs-review pr 275057 run on aarch64-linux 1

1 package built:
  • matrix-authentication-service

@adamcstephens adamcstephens merged commit 538fcf1 into NixOS:master Jan 20, 2024
22 checks passed
@teutat3s teutat3s deleted the init-matrix-authentication-service branch January 23, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants