atsign-foundation / at_libraries

Support libraries & dependencies for Atsign's technology
https://pub.dev/publishers/atsign.org/packages
BSD 3-Clause "New" or "Revised" License
38 stars 11 forks source link

AtSigningAlgo and AtHashingAlgo data set in OnboardingCli not reaching AtAuth #602

Open srieteja opened 2 months ago

srieteja commented 2 months ago

Describe the bug

Although AtOnboardingPreference takes AtSigningAlgo and AtHashingAlgo as optional inputs. There is no way as of now to pass that same data to AtAuth. This causes AtAuth to perform Auth using the default values for Signing and Hashing algo.

Steps to reproduce

  1. Create an instance of AtOnboardingCli, where the AtOnboardingPreference mentions AtSigningAlgo to be 'ecc_secp256r1'
  2. In the above step, ensure to pass ecc type Public and Private keys for pkam/apkam authentication
  3. Set the AtSignLogger root level to FINER
  4. Call AtOnboardingService.authenticate()
  5. PKAM authentication fails
  6. On finding the command that is sent to perform pkam authentication, the command would still mention that AtSigningAlgo is RSA.

Expected behavior

The pkam authentication command should specify whichever SigningAlgo mentioned in the AtOnboardingPreferences

Additional context

One possible solution could be adding new params for AtSigningAlgo and AtHashingAlgo in AtOnboardingRequest, which is used to pass params from AtOnboardingCli to AtAuth.

srieteja commented 1 month ago

Blocked by https://github.com/atsign-foundation/at_server/issues/2045. Requires the mentioned issue to be fixed for the functional tests to pass.