Skip to content

[18.0][ADD] vault_portal: portal access to shared vaults - #983

Draft
cvinh wants to merge 1 commit into
OCA:18.0from
invitu:18.0-add_vault_portal
Draft

[18.0][ADD] vault_portal: portal access to shared vaults#983
cvinh wants to merge 1 commit into
OCA:18.0from
invitu:18.0-add_vault_portal

Conversation

@cvinh

@cvinh cvinh commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Extends vault (OCA/server-auth) to let portal contacts view and, where explicitly granted per contact, edit or add password field values from their own portal account.

Access stays strictly per individual, end-to-end encrypted exactly like internal users: each contact holds their own key pair, and the vault's master key is re-wrapped for them individually. Two clients never share any key material.

Read-only by default at every layer (model access, ir.rule and vault.abstract.check_access(), unchanged from "vault"): the vault itself and entry names always stay read-only from the portal; only the value of a vault.field can be written, gated by
vault.right.perm_write/perm_create per contact.

An optional MFA policy (Settings > Vault) can require two-factor authentication before a portal contact is granted write access, or any access at all; disabling 2FA afterwards applies the same policy in reverse.

Assisted-by: Claude Sonnet 5

@cvinh
cvinh force-pushed the 18.0-add_vault_portal branch 2 times, most recently from 7f0ba30 to d29ad30 Compare August 21, 2026 12:58
@cvinh
cvinh marked this pull request as ready for review August 21, 2026 13:01
@cvinh
cvinh force-pushed the 18.0-add_vault_portal branch from d29ad30 to 2003667 Compare August 22, 2026 01:29
@cvinh

cvinh commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

@jans23 it would supercool if you review this 99% AI coded module... we deployed it in test and it looks like ok...
About reviewing js I'm not expert...

@cvinh
cvinh marked this pull request as draft August 22, 2026 01:32
@cvinh
cvinh force-pushed the 18.0-add_vault_portal branch 6 times, most recently from 9896025 to e51639c Compare August 24, 2026 06:26
@jans23

jans23 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

My colleague would be better positioned for reviewing. @KDRdev could you review it please?

@cvinh
cvinh force-pushed the 18.0-add_vault_portal branch 4 times, most recently from f679355 to bec3f00 Compare August 24, 2026 07:11
@cvinh
cvinh marked this pull request as ready for review August 24, 2026 07:15
@cvinh
cvinh marked this pull request as draft August 25, 2026 02:12
@cvinh

cvinh commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

still WIP

@cvinh
cvinh force-pushed the 18.0-add_vault_portal branch 4 times, most recently from 4326b21 to 2d9dbc1 Compare August 25, 2026 18:51
@cvinh
cvinh marked this pull request as ready for review August 25, 2026 19:03
@cvinh

cvinh commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

ready for review
@jans23 maybe you can do a functional review on runboat ?

@fkantelberg fkantelberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I left only some comments. The same applies for most of the JS. Please use the framework and controllers instead of doing everything with plain JS when it's not needed. Also a lot of the important functions like encryption/decryption etc. is duplicated and can lead to problems in the future. I haven't tested it yet and from glancing over it the key management might be a problem or atleast not fully supported (invalidation, new password etc.)

Comment thread vault_portal/static/src/frontend/portal_vault.esm.js Outdated
Comment thread vault_portal/static/src/frontend/portal_vault.esm.js Outdated
Comment thread vault_portal/static/src/frontend/portal_vault.esm.js Outdated
@cvinh
cvinh force-pushed the 18.0-add_vault_portal branch from 2d9dbc1 to e1faa6d Compare September 3, 2026 01:05
@cvinh
cvinh force-pushed the 18.0-add_vault_portal branch 2 times, most recently from b16b956 to ce132fd Compare September 3, 2026 02:21
@cvinh

cvinh commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

I left only some comments. The same applies for most of the JS. Please use the framework and controllers instead of doing everything with plain JS when it's not needed. Also a lot of the important functions like encryption/decryption etc. is duplicated and can lead to problems in the future. I haven't tested it yet and from glancing over it the key management might be a problem or atleast not fully supported (invalidation, new password etc.)

Thanks for reviewing this 99% AI dev... I was unable to review js/controller because of my very bad level in it...
I hope there is not too many garbage now...

@cvinh

cvinh commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

tests fail because of cross_connect_server/tests/test_cross_connect_server.py

@cvinh
cvinh force-pushed the 18.0-add_vault_portal branch 2 times, most recently from 69f55f9 to b70627c Compare September 3, 2026 03:24

@fkantelberg fkantelberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tell me if it's working again and you need a proper review + tests. It goes into a better direction now.

Comment thread vault_portal/__manifest__.py
Comment thread vault_portal/controllers/portal.py
@cvinh
cvinh marked this pull request as draft September 3, 2026 11:48
@cvinh
cvinh force-pushed the 18.0-add_vault_portal branch from b70627c to c8f09b9 Compare September 3, 2026 20:29
Extends vault (OCA/server-auth) to let portal contacts view and, where
explicitly granted per contact, edit or add password field values from
their own portal account.

Access stays strictly per individual, end-to-end encrypted exactly
like internal users: each contact holds their own key pair, and the
vault's master key is re-wrapped for them individually. Two clients
never share any key material.

Read-only by default at every layer (model access, ir.rule and
vault.abstract.check_access(), unchanged from "vault"): the vault
itself and entry names always stay read-only from the portal; only the
value of a vault.field can be written, gated by
vault.right.perm_write/perm_create per contact.

An optional MFA policy (Settings > Vault) can require two-factor
authentication before a portal contact is granted write access, or any
access at all; disabling 2FA afterwards applies the same policy in
reverse.

Assisted-by: Claude Sonnet 5
@cvinh
cvinh force-pushed the 18.0-add_vault_portal branch from c8f09b9 to fffc8a2 Compare September 4, 2026 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants