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

[MIG][16.0] Migration of vault #611

Merged
merged 68 commits into from
Feb 22, 2024
Merged

[MIG][16.0] Migration of vault #611

merged 68 commits into from
Feb 22, 2024

Conversation

fkantelberg
Copy link
Member

@fkantelberg fkantelberg commented Feb 1, 2024

The migration needed quite a rework because of the JS framework changes. (I hope the next are easier) I tested every functionality during migration but plan to do another round again soon.

There are some minor fixes which were possible to do:

  • Better file handling. Inside of an entry you can send files to an inbox now
  • Adjusting the iterations for PBKDF2 to the OWASP recommendations >= 600,000. The user keys should be automatically migrated if the user uses it the first time [backportable]

@pedrobaeza
Copy link
Member

Thanks for the migration.

Can you please leave this one only for the module vault and o later vault_share with its story. Another thing you can do is to compact a bit the commit story, as it contains some non useful commits, like the first 11.

fkantelberg and others added 26 commits February 2, 2024 08:16
Fix website in manifest

Run pre-commit

Move models to own files. Apply OCA conventions

Remove logging causing the tests to fail

Add application icon

Split models into files. Use lambda for defaults

Add icon to menuitem

Use lambda as suggested

Add missing keepass lib

Show information if user lacks public key

Add note about no https

Fix domain for user_id in send wizard. Add permanent note to wizard
…lect all possible users due to access rights - Disable the features if browser isn't using a secure context (https/localhost) - Load required assets in inbox and share frontends - Allow the user to switch a parent of an entry within the same vault - Allow to create entries for vaults using the main menu Entries - Fix bug that encrypted a share twice due to multiple extension with VaultAbstract - Fix a bug on share create that throws a warning about changed values
…changed

Note about disaster recovery project

Add missing dependency to base_setup for res.config.settings view
Before the path if we create a new child entry from other entry, the
complte_name of the entry is not changing when we save the new entry.

Doing this changes, we are getting the complete_name correctly.

TT38729
vault: Searchpanel improvements:

- Add a domain to only show records with children.
- Set limit to False.

TT38731

vault: Add Vaults to searchpanel view. TT38731
… Re-encrypt vaults if the user changes the private key - Recompute access. Unittests
@fkantelberg
Copy link
Member Author

I was able to reproduce the issue. Seems like a hidden bug in all versions. I reproduced it by clicking away the first password dialog when I clean all browser caches. If I try to read this.time was null which causes an early return instead of reimporting of the keys.

@CarlosRoca13
Copy link
Contributor

I'm giving access to demo user but he can not see any secret... See gif below

Access_error

@fkantelberg
Copy link
Member Author

In my tests I had the issue that the key in vault.right wasn't generated correctly because of the if in the controller. I suspect that this is also the issue for your case. Not 100% sure because the right was marked red in my case but isn't in your case.

@bosd
Copy link
Contributor

bosd commented Feb 17, 2024

image
The buttons in the topbar, don't seem to be working.
Import file, Export file, Verify, Re-encrypt

Also the smart button "Entries" is no longer working.

@fkantelberg
Copy link
Member Author

@bosd I can't reproduce it and every button is working. Maybe a module update gone wrong on your local instance? At least the smart button doesn't do anything special just uses a normal action.

@CarlosRoca13
Copy link
Contributor

In my tests I had the issue that the key in vault.right wasn't generated correctly because of the if in the controller. I suspect that this is also the issue for your case. Not 100% sure because the right was marked red in my case but isn't in your case.

I think the problem was that, I have deleted and re-added the user and there has been no problem.

I think it's ready 👍 😄

@bosd
Copy link
Contributor

bosd commented Feb 19, 2024

Maybe a module update gone wrong on your local instance?

I was using the runboat.. Will reset it and try again.

@fkantelberg
Copy link
Member Author

@bosd Please check that you aren't using http. https:// is required for the module because the browser enforces it for the secure context and browser side encryption.

@pedrobaeza
Copy link
Member

@fkantelberg maybe a clarification in the ROADMAP of the module mentioning explicitly runboat there?

@bosd
Copy link
Contributor

bosd commented Feb 19, 2024

Thanks,with https The import window is working now.
I'm getting more clickable icons on the screenlike in above gif's.

Export throws an error..
image

Viryfy buttons as well:
UncaughtPromiseError > OperationError
Uncaught Promise
OperationError

The smartbutton:
image

@fkantelberg
Copy link
Member Author

There is a line in the readme This modules requires a secure context for the browser to work properly. but I guess I'm just biased and know what it means. Roadmap sounds like that I want to work on "fixing" it but http will never be supported beside localhost.

Is there a technical reason why the runboat links to http instead of the possible https per default?

@bosd
Regarding the error: I assume it just happens because it was possible to create a vault without https. The vault and user keys aren't initialized correctly and can be thrown away. I have to check if I can further prevent anything when the context isn't secured.

@pedrobaeza
Copy link
Member

Roadmap sounds like that I want to work on "fixing" it but http will never be supported beside localhost.

The file is called ROADMAP.rst, but the section is "Known issues / Roadmap".

Is there a technical reason why the runboat links to http instead of the possible https per default?

@sbidoul can tell you, but if the certificate is self-signed, it's for not having the browser alert and have more questions about that.

@sbidoul
Copy link
Member

sbidoul commented Feb 19, 2024

Is there a technical reason why the runboat links to http instead of the possible https per default?

It's not a technical reason, but to avoid the burden of maintaining a trusted wildcard certificate.

@bosd
Copy link
Contributor

bosd commented Feb 19, 2024

Thanks for the clarifications.
Did'nt spot that line in the readme. Even if i did I don't know what it means 🤐

I'm used to test stuff on runboat. Did'nt occur to me that is not possible for this module.
Guess this is the exception of the rule.

@fkantelberg
Copy link
Member Author

You can just swap to https and confirm the self signed certificate of the runboat to test it.

I understand that a wildcard cert can be a burden. I see how I can make it a bit more error prune when not using a secure context and check if I can rephrase the hint in the readme.

…d. Improve readme documentation about this requirement
@fkantelberg
Copy link
Member Author

The latest patch does some things when the secure browser context isn't available:

  • Disables the buttons for vault list and form view (no create, save, discard)
  • Throws a descriptive error when hitting an action that https should be tried or the admin contacted

Additionally I extended the readme and added it also to the roadmap. I hope this makes it visible enough 😄

Copy link
Contributor

@bosd bosd left a comment

Choose a reason for hiding this comment

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

The latest patch does some things when the secure browser context isn't available:

Hehehe, That's one feature I could test succesfuly 😀

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-611-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 2bfc1ee into OCA:16.0 Feb 22, 2024
9 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 23d8df7. Thanks a lot for contributing to OCA. ❤️

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

Successfully merging this pull request may close these issues.

10 participants