Skip to content

[16.0][MIG] auth_saml: Migration to 16.0#498

Merged
OCA-git-bot merged 37 commits intoOCA:16.0from
xcgd:16.0-mig-auth_saml
Mar 28, 2023
Merged

[16.0][MIG] auth_saml: Migration to 16.0#498
OCA-git-bot merged 37 commits intoOCA:16.0from
xcgd:16.0-mig-auth_saml

Conversation

@vincent-hatakeyama
Copy link
Copy Markdown
Contributor

@vincent-hatakeyama vincent-hatakeyama commented Mar 13, 2023

This module been tested with a local keycloak.

The migration includes the 15.0 code and the features from #481 and #483.

max3903 and others added 30 commits March 26, 2018 14:17
The following line of code for 11.0:
 - https://github.com/odoo/odoo/blob/52d6f0e3ee90874fc93fec9cdff74ec71d3b991f/addons/auth_oauth/controllers/main.py#L69

is assigning the key "auth_link" for "list_providers" method.

The following template is expecting this key:
 - https://github.com/odoo/odoo/blob/52d6f0e3ee90874fc93fec9cdff74ec71d3b991f/addons/auth_oauth/views/auth_oauth_templates.xml#L5

So, it raise a KeyError compiling "template_auth_oauth_providers_N"

This change is fixing adding that expected key in order to avoid this KeyError
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-auth-11.0/server-auth-11.0-auth_saml
Translate-URL: https://translation.odoo-community.org/projects/server-auth-11-0/server-auth-11-0-auth_saml/
[FIX] dependencies
add requirement on lasso
- Default behavior is now to allow password and SAML together.
  Otherwise, users could keep getting their passwords removed without warning.
- General cleanup.
- Remove relations to field `password_crypt` because in v12 the
  `password` field is always encrypted instead.

Co-Authored-By: Alexandre Díaz <[email protected]>
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-auth-12.0/server-auth-12.0-auth_saml
Translate-URL: https://translation.odoo-community.org/projects/server-auth-12-0/server-auth-12-0-auth_saml/
🚑 Fix the disallow password for users with SAML ids
Added tests to ensure the feature works correctly.
Admin user is also an exception from not having a password. In Odoo 15.0, this is the standard user to connect for administrative task, not the super user.
✨ Improve provider form and list views
✨⏩ port of 11.0 automatic redirection from 11.0 version. Use disable_autoredirect as a parameter query to disable automatic redirection (for example https://example.com/web/login?disable_autoredirect=)
💄 Add certificate file name fields to improve the UI
📝 Add required on several fields of the SAML provider; without them the server will crash and there is not enough information to make SAML work.
✨ Split signing to have finer control and be compatible with more IDP.
🔨 Integrate token into res.users.saml, removing auth_saml.token. No need for a separate table, and no more need to create lines in the table.
📝 Avoid server errors when user try metadata page without necessary parameters.
🚑 Replace method call from odoo.http.redirect_with_hash to request.redirect as the former does not exists in Odoo 15.0 anymore.
📚 Improved the module documentation
👕 pylint fixes and other fixes or minor changes
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-auth-15.0/server-auth-15.0-auth_saml
Translate-URL: https://translation.odoo-community.org/projects/server-auth-15-0/server-auth-15-0-auth_saml/
OCA-git-bot and others added 2 commits October 5, 2022 16:05
Make the login page compatible with auth_oauth by using a differently
named variable.

Render the button with the similar classes and HTML as what is done by auth_oauth.
That includes using the default CSS and adding translation for the
button text.
@szekawong szekawong deleted the 16.0-mig-auth_saml branch March 14, 2023 15:12
@vincent-hatakeyama vincent-hatakeyama marked this pull request as ready for review March 14, 2023 16:03
@luisg123v
Copy link
Copy Markdown
Contributor

luisg123v commented Mar 22, 2023

Hi @vincent-hatakeyama,

Is this ready to review? Is there anything we can help you with?

CC @Rodrigosu-Vauxoo @desdelinux @randall-vx

@vincent-hatakeyama
Copy link
Copy Markdown
Contributor Author

The migration is finished and ready to be merged. What makes you think otherwise?

@luisg123v
Copy link
Copy Markdown
Contributor

What makes you think otherwise?

The fact that the PR is red.

Copy link
Copy Markdown
Contributor

@luisg123v luisg123v left a comment

Choose a reason for hiding this comment

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

I see two extra commit that are not present in 15.0:

Where they come from?

There should be only one migration commit, and these ones are even placed before migration.

@vincent-hatakeyama
Copy link
Copy Markdown
Contributor Author

The PR is in red due to a slight decrease in coverage due to the removal of login_and_redirect. I’ve been told that coverage change is not a blocking issue.

The 2 commits are from #481 and #483. I should have mentioned that.

@vincent-hatakeyama vincent-hatakeyama force-pushed the 16.0-mig-auth_saml branch 2 times, most recently from 83b5d14 to 70b845b Compare March 24, 2023 09:50
Copy link
Copy Markdown
Contributor

@luisg123v luisg123v left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Hi @moylop260,

Could you review, please?

CC @desdelinux

@moylop260
Copy link
Copy Markdown
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

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

@OCA-git-bot OCA-git-bot merged commit 2bfaf21 into OCA:16.0 Mar 28, 2023
@OCA-git-bot
Copy link
Copy Markdown
Contributor

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

@sbidoul
Copy link
Copy Markdown
Member

sbidoul commented Jun 6, 2023

/ocabot migration auth_saml

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Jun 6, 2023
SiesslPhillip pushed a commit to grueneerde/OCA-server-auth that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/server-auth (16.0)
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.