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

Argon2.hash fails on MacOS (aarch64-darwin) #2

Open
shivaraj-bh opened this issue Oct 15, 2023 · 0 comments
Open

Argon2.hash fails on MacOS (aarch64-darwin) #2

shivaraj-bh opened this issue Oct 15, 2023 · 0 comments

Comments

@shivaraj-bh
Copy link
Member

Error msg, for ref.:

src/Passetto/Crypto.hs:122:26: error:
    • Couldn't match expected type ‘[Proxy
                                       "cryptonite:Crypto.KDF.Argon2.hash is known to be broken on this architecture. See https://github.com/haskell-crypto/cryptonite/issues/360"]’
                  with actual type ‘Argon2.Options’
    • In the first argument of ‘Argon2.hash’, namely
        ‘keyDerivationOptions’
      In the first argument of ‘(&)’, namely
        ‘Argon2.hash keyDerivationOptions pw salt secretbox_keybytes’
      In the expression:
        Argon2.hash keyDerivationOptions pw salt secretbox_keybytes
          & throwCryptoError
    |
122 |   let skBs = Argon2.hash keyDerivationOptions pw salt secretbox_keybytes

check here: haskell-crypto/cryptonite#360

Maybe consider using a different hashing algorithm based on cabal_flags, similar to what this PR did: cdepillabout/password#63

srid added a commit to nammayatri/nammayatri that referenced this issue Jan 22, 2024
Migrate from docker-compose to Nix (via
https://github.com/juspay/services-flake )

TODO:
- [x] Add osrm-server to services
(f8b27f1)
(97e0824)
- [x]
`db-primary`(02eb257)
(f9fa2af)
  - [x] juspay/services-flake#64
- [x] nixpkgs: `postgis` extension doesn't work on macOS (**merging with
main solved it — main has a more latest nixpkgs**)
- [x] `location-db`
(02eb257)
(01e238c)
- [x] Figure out the configuration for syncing `db-replica` and
`location-db-replica` with their respective masters **->** Run
[pg_basebackup](https://www.postgresql.org/docs/current/app-pgbasebackup.html)
in a separate process.
(02eb257)
(ad639bd)
  - [x] juspay/services-flake#70 
- [ ] Once successful, write a short note on
juspay/services-flake#65
- [x] `redis`
(02eb257)
- [x] `initalDumps` in passetto service
(nammayatri/passetto#5)
- [x] `initialDumps` in
[services-flake](juspay/services-flake#64).
- [x] `passetto`
(02eb257)
- [x] `zookeeper`
(5b5e008)
- [x] `kafka`
(5b5e008)
- [x] `nginx`
(5b5e008)
- [x] `redis-cluster`
(5b5e008)
- [ ] Update FAQ section linking to a `services-flake` doc explaining
about data directory and how to get a fresh start for a service.
- [x] Add `namespace` to `pgBaseBackup*` processes.

The following issues will be part of a different PR
- Add grafana to services-flake
juspay/services-flake#59
- Add prometheus to services-flake
juspay/services-flake#60
- Add pgadmin to services-flake
juspay/services-flake#80

## Run services natively with `services-flake` (MacOS and Linux)
```
nix run github:shivaraj-bh/nammayatri/services-flake#services --refresh
```

**Note: passetto-server uses rosetta emulation on MacOS due to
juspay/passetto#2

---------

Co-authored-by: Rohit Singh <[email protected]>
Co-authored-by: Shivaraj <[email protected]>
Co-authored-by: Sridhar Ratnakumar <[email protected]>
shivaraj-bh added a commit to nammayatri/passetto that referenced this issue Jul 27, 2024
cryptonite is now a public archive.

resolves juspay#2
shivaraj-bh added a commit to nammayatri/nammayatri that referenced this issue Jul 27, 2024
cryptonite (existing library used by passetto) is now a public archive.

Also using crypton eliminates the need to use rosetta by default on
macOS. Resolving juspay/passetto#2
shivaraj-bh added a commit to nammayatri/passetto that referenced this issue Jul 27, 2024
cryptonite is now a public archive.

resolves juspay#2
shivaraj-bh added a commit to nammayatri/nammayatri that referenced this issue Jul 27, 2024
cryptonite (existing library used by passetto) is now a public archive.

Also using crypton eliminates the need to use rosetta by default on
macOS. Resolving juspay/passetto#2
shivaraj-bh added a commit to nammayatri/nammayatri that referenced this issue Jul 27, 2024
cryptonite (existing library used by passetto) is now a public archive.

Also using crypton eliminates the need to use rosetta by default on
macOS. Resolving juspay/passetto#2
srid pushed a commit to nammayatri/nammayatri that referenced this issue Jan 16, 2025
cryptonite (existing library used by passetto) is now a public archive.

Also using crypton eliminates the need to use rosetta by default on
macOS. Resolving juspay/passetto#2

Passetto PR: nammayatri/passetto#8


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Chores**
- Updated configuration to simplify package selection for the Passetto
service.
- Changed the Passetto input source to use a different branch in the
project's flake configuration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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

No branches or pull requests

1 participant