beckn / beckn-onix

beckn onix
MIT License
40 stars 21 forks source link

Create a solution for synchronizing users with subscriber_ids of Beckn-ONIX installed PS #176

Open vbabuEM opened 2 months ago

vbabuEM commented 2 months ago

Problem Currently when we install PS using Beckn ONIX, we ask the user for subscriber_id and subscriber_url. We then automatically create a network participant at the registry using these credentials and register the public key.

The problem is that this entry for the NP is modifiable only by the Admin of registry. It is not associated with the user. So the user will not be able to edit this.

Similarly when the user tries to reinstall Beckn-ONIX, the newly created key will not be updated at the registry as the authentication is not available.

Solution At a high level, we need to somehow associate the subscriber and key that is created as part of Beckn ONIX to a user. Here is one option:

  1. When we do Beckn ONIX installation we can ask the user if he has already registered with the registry
  2. If he says yes, we ask him to enter the username and password.
  3. If he says No, we ask him to enter a username and password to create user on registry
  4. We create the user if required in the registry
  5. We login with the credentials
  6. All subsequent actions (create subscriber id, network role and key) should be done with this credential.

This will ensure that the user can access the participant, network role and the participant key section on the registry to update them as required.

Similarly when the user is reinstalling the software, it will still work as his credentials will allow update also from command line.

This needs to be discussed with FIDE Engineering for two reasons

  1. It is a significant change in user experience
  2. GUI installation will also have to be changed. Coordination etc.
vbabuEM commented 2 months ago

https://github.com/beckn/beckn-onix/issues/177 is also related to this

vbabuEM commented 1 month ago

@emmayank , @faizmagic , @viraj89 , @prasad-takale-eminds , This needs to be fast-tracked. AWS installation will reuse this solution.