Skip to content

Refactoring - move backend affiliation/affiliation invitation/business contact functionality from AUTH to LEAR #31267

Closed
2 of 4 issues completed

Description

@JohnamLane

Update the API calls used by the MBR Dashboard and the future "Authorized Accounts" view to pull from LEAR, rather than AUTH.

Risk Profile:

Business contact migration -> lower risk of potential issues
Affiliation invitation -> low risk of potential issues, but a bit higher than business contact
Affiliation -> more risk

Benefits:

  1. Business information easily accessible under one schema, you see the flow of the NR to the business all inside of LEAR and delegation / magic link after that.
  2. No more querying 3 systems to combine a single row on the BRD. It would just be 2 systems. This should improve performance.
  3. May make it more viable for SOLR to work?
  4. Entities will have full control over their data, passcodes, migration times and not have to worry about consulting AUTH to migrate businesses over from COLIN
  5. Setup will be easier to deal with granular permissions as they can see all of the data
  6. DBC and affiliations will be located in the same place (right now it's in two different spots to indicate business control?)
  7. Business contact migrated over, more efficient they can manage their own contacts for testing etc.
  8. Less tightly coupled to AUTH - only relies on AUTH for Org/Membership/Product/User and Pay for Payment Information
  9. AUTH this will make it easier cross team if entities wants to work on BRD etc they can just change their own data and routes
  10. Will allow us to change affiliations to include type and status
  11. Breaks a dependency for affiliation from Names -> AUTH
  12. We could easily combine affiliation invitations and affiliations and DBC in one dashboard etc? For the future?
  13. Cleans up AUTH code tremendously, gets rid of all entities information in auth
  14. Allows BRD to be populated with more information EG. filing information and filtering that shouldn't be done in AUTH.

Disadvantages:

  1. You will have some NR only affiliations inside of LEAR but these are the foundations of the businesses (or just name changes) and important historical information. It's possible a NR could just go nowhere
  2. More code into LEAR
  3. Developer time
  4. Proxying from LEAR to Names, isn't the best, but will have to be done to combine business rows (similar to what AUTH is doing now, but AUTH doesn't always know which NR's are associated to which businesses)
  5. Risk of breaking API users (can be mitigated I believe with version routes and/or backwards compat proxy calls for now)
  6. Potentially more traffic on LEAR
  7. Report breaking?

Sub-issues

Sub-issues

2 of 4 Issues completed
Loading 4 sub-issues

Activity

  1. added
    Pay
    on Nov 13, 2025
  2. added theissue type on Nov 13, 2025
  3. changed the title [-]Refactoring - move affiliation functionality from AUTH to LEAR[/-] [+]Refactoring - move affiliation/affiliation invitation/business contact functionality from AUTH to LEAR[/+] on Dec 1, 2025
  4. severinbeauvais commented on Dec 12, 2025

    @severinbeauvais
    Collaborator

    This will affect:

    • affiliation of NRs
    • affiliation of businesses, including:
      • delegation from another account (request and response) (BRD and Business Dashboard)
      • magic link email generation
      • magic link URL processing (in BRD)
    • the Auth API call to fetch affiliations (including filtering and paging), which affects:
      • Auth API
      • Business API
      • Namex API
    • the Business Lookup section on the staff dashboard
    • the Continuation Review section on the staff dashboard
    • the Account Info page (and all UIs that link to it)

    Integration of these changes introduces dependencies between Auth API and Business API (and some UIs). This will take special planning to be released together (may even require some downtime).

    Update (Dec 15): I added some more items above

  5. 7 remaining items

  6. severinbeauvais commented on Dec 19, 2025

    @severinbeauvais
    Collaborator

    What's the plan for data migration (to minimize downtime)?

    Can we implement Feature Flags to permit partial or targeted releases (eg, part of the work, or only some users initially)?

  7. severinbeauvais commented on Dec 19, 2025

    @severinbeauvais
    Collaborator
    • the Business Lookup section on the staff dashboard
    • the Continuation Review section on the staff dashboard
    • the Account Info page

    Will these stay in Auth Web (UI)? If not, where will they be moved to?

  8. severinbeauvais commented on Dec 22, 2025

    @severinbeauvais
    Collaborator
    • the Account Info page
      Will these stay in Auth Web (UI)? If not, where will they be moved to?
      separate ticket - but should probably go into business-ui mono repo?
      Account Info should stay in auth (as it has contact information tied to an account)

    I meant the User (Edit) Profile page. Yes, it should probably go in the business-ui repo.

    Is a new UI needed in that repo? If yes, need to factor in a bit of time to stand up a new UI, CI/CD, etc.

  9. severinbeauvais commented on Dec 22, 2025

    @severinbeauvais
    Collaborator

    Actually, I'm unclear: it moving Business Lookup, Continuation Review and User Profile out of Auth Web in scope? Or will they stay put and just the necessary API calls will be updated?

  10. changed the title [-]Refactoring - move affiliation/affiliation invitation/business contact functionality from AUTH to LEAR[/-] [+]Refactoring - move backend affiliation/affiliation invitation/business contact functionality from AUTH to LEAR[/+] on Dec 22, 2025
  11. thorwolpert commented on Dec 22, 2025

    @thorwolpert
    Collaborator

    The base auth pages are/will be in the connect layers, so apps can route to them without having to change hosts.

  12. seeker25 commented on Dec 22, 2025

    @seeker25
    Contributor

    Actually, I'm unclear: it moving Business Lookup, Continuation Review and User Profile out of Auth Web in scope? Or will they stay put and just the necessary API calls will be updated?

    long term, might be a good idea especially while upgrading auth-web to nuxt.

    But that's not in the scope of this ticket, this ticket is just to get backend affiliations / affiliation invitations / business contacts into a healthier spot

  13. severinbeauvais commented on Dec 22, 2025

    @severinbeauvais
    Collaborator

    Thanks, Thor and Travis for the updates. Sounds good.

  14. vysakh-menon-aot commented on Dec 22, 2025

    @vysakh-menon-aot
    Contributor

    Are we planning to change the existing data structure to improve BRD search (I believe we are just moving as is with minor changes to link business)? Do we expect any release freeze for this work?

    Are we following these steps to migrate (this is what i understood from the above tickets)?

    • Step 1
      • Migrate from auth-api to legal-api
      • Migrate data from auth to lear
      • Setup reverse proxy for this step
    • Step 2
      • Update all the dependent UI's / API's to use the new endpoint
      • Remove reverse proxy (do we have to keep it for longer? like for api users?)
  15. OlgaPotiagalova commented on Dec 23, 2025

    @OlgaPotiagalova
    Collaborator

    From the notes above and discussions with the team : We do see potential benefits for Entities in moving the affiliation logic into the Business Registration module, particularly as it may help address some existing BRD issues and enable future improvements.

    That said, I need more context and a deeper understanding of the problem, specifically, it would be helpful to understand:

    1. Problem definition
      • What concrete problems with the current short-term affiliation/delegation proposed changes cannot be solved within the existing implementation?
      • Which exact changes are impossible or complex under the current architecture, and why?

    2. Historical context
      • What were the original reasons for placing affiliation logic in AUTH when this design was introduced years ago?
      • Which of those assumptions still valid, and which no longer apply?

    3. Alternatives considered
      • Beyond moving the logic into LEAR/Legal-API, what other options were explored? For example, was a dedicated “affiliations” module considered, separate from both AUTH and LEAR/Legal-API?
      • If alternatives were evaluated, what were the trade-offs that led to the current proposal?

    4. Other questions/concerns:
      • Do we anticipate partial duplication of the auth logic across both sides because of this change?
      • What new security risks might this introduce, and how would they be mitigated?
      • Would it potentially complicate integrations with other products/modules (NR, Search, etc, or the future ones) once affiliation logic is moved?

    From my perspective, this proposal is not merely a technical refactor. It impacts ownership boundaries, security aspects, integrations, and long-term maintenance plan. To make an informed decision, we need sufficient information to assess these points holistically.

    At this point, do we have enough data and analysis to evaluate the change from all of these perspectives?

  16. loneil commented on Dec 24, 2025

    @loneil
    Collaborator

    For existing Digital Business Card functionality specifics, there's nothing really different than the needs for cutting over all the other parts of the applications I don't think.

    • Login and business access to get a DBC is nothing specific to DBC (logging in and going to Manage Business, same as everything else)
    • The Auth API is called at one point to check current logged in users affiliations (for one permission check requirement), this call happens from legal-api
    • There is a event published to a topic (TEST env version: projects/gtksf3-test/topics/auth-event-test) that a subscriber in the Business namespace listens to.

    So if the moved/new Auth API keeps existing behavior it should not be any changes (other than possibly adjusting subscriber source in GCP)

  17. JohnamLane commented on Feb 11, 2026

    @JohnamLane
    CollaboratorAuthor

    This refactoring ticket likely won't be needed but other changes to match the future affiliation policy will. I will close this and re-open other tickets as needed. When the affiliation changes are planned further we can share a technical roadmap and engage with everyone impacted to plan a way forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Entities TeamPay

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions