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

Support invite accept reject #893

Merged
merged 49 commits into from
Oct 29, 2024
Merged

Support invite accept reject #893

merged 49 commits into from
Oct 29, 2024

Conversation

James-Mart
Copy link
Member

@James-Mart James-Mart commented Oct 21, 2024

Description

This PR introduces two important improvements for user management:

  1. The invites generated in the invite plugin can now be accepted/rejected. If accepted, a new account is created.
  2. Transactions submitted on behalf of accounts that require key authorization will automatically sign with the necessary keys.

Changes overview

  • Create the producer account specified at boot as a real account on the network
  • Improve invite plugin
  • Add initial plugins for all auth services: authsig, authany, authinvite, authdelegate
    • ...of these, authdelegate is still just a skeleton. Accounts using authdelegate will fail to send transactions.
  • Improve smart-authorization docs
  • Separate the smart-auth interface used by auth plugins (the export interface) from those that need to dynamically link to the user's auth plugin (the import interface).
  • Develop dynamic plugin loading infrastructure (to allow transact to dynamically link to the user's auth plugin and auth notifiers)
  • transact plugin: attach correct claims/proofs to each transaction
  • Add "logout" and "isLoggedIn" functions to accounts plugin
  • Significant refactor/cleanup of supervisor plugin loading code. Loads plugins in two phases:
    • Phase 1) Load all "regular" plugins (not dynamic)
    • Phase 2) Load all dynamic plugins (those that are linked to dynamically)
      • This phase separation is necessary because loading dynamic plugins may depend on calling into prior loaded "regular" plugins to retrieve information

…or the domain of the active (top-level) application
@James-Mart James-Mart added the System app Related to system services and their apps/plugins label Oct 21, 2024
…y auth-notifier. Unlike the auth service pluign, auth-notifiers should not be privy to the entire transaction data.
Copy link
Member Author

@James-Mart James-Mart Oct 22, 2024

Choose a reason for hiding this comment

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

Was tempted to just put this in transact/plugin/deps/. I figured leaving it next to export.wit will help ensure that these stay in sync

@James-Mart James-Mart marked this pull request as ready for review October 23, 2024 17:18
rust/psibase/src/services/auth_invite.rs Outdated Show resolved Hide resolved
rust/psibase/src/services/invite.rs Outdated Show resolved Hide resolved
services/system/Accounts/plugin/smartAuth/export.wit Outdated Show resolved Hide resolved
services/system/Transact/plugin/src/helpers.rs Outdated Show resolved Hide resolved
services/system/Transact/plugin/src/helpers.rs Outdated Show resolved Hide resolved
services/system/Transact/plugin/src/types.rs Outdated Show resolved Hide resolved
@James-Mart James-Mart merged commit 489f6fb into main Oct 29, 2024
4 checks passed
@James-Mart James-Mart deleted the support-invite-accept-reject branch October 29, 2024 19:16
@James-Mart James-Mart mentioned this pull request Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
System app Related to system services and their apps/plugins
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants