Skip to content

Conversation

@vincent-hatakeyama
Copy link
Contributor

🚑 Fix the module by adding a transaction to commit the token
🚑 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

I’ve tested the module with a local keycloak. As I wrote in #337 (comment) the module did not work correctly, the base functionality was not working.
I’ve also fixed the allow password option and added tests.
My changes for the sign attribute on the provider comes from testing, where keycloak does not handle all the default signing, and from #321 indicating other IdP can have the same kind of needs.
I’ve ported the automatic redirection to a SAML provider from never merged #107

I’ve updated the README manually because it does not seem to be generated automatically. It might be missing some files in the readme directory, so I’ve added them. Same for the static/description/index.htmlfile.

#315 also affects this version, so I’ve made the certificates mandatory for now.

@vincent-hatakeyama vincent-hatakeyama changed the title [FIX][IMP] Fix and improve auth_saml [15.0][FIX][IMP] Fix and improve auth_saml Feb 17, 2022
@vincent-hatakeyama vincent-hatakeyama force-pushed the topic/15.0/auth_saml branch 2 times, most recently from 50146d3 to 3819571 Compare February 17, 2022 15:05
Copy link
Member

@damdam-s damdam-s left a comment

Choose a reason for hiding this comment

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

thanks

@simahawk
Copy link
Contributor

Thanks for your contrib!
I'm not the maintainer of this module but 1 commit only for all these changes doesn't look that cool.
Any chance you could split them?
Regarding the readme: if you update it manually it won't be kept.

@vincent-hatakeyama
Copy link
Contributor Author

Thanks for your contrib! I'm not the maintainer of this module but 1 commit only for all these changes doesn't look that cool. Any chance you could split them?

I have been asked to squash history in the past, I believe it is still the process at OCA.

Regarding the readme: if you update it manually it won't be kept.

All changes have been put in the readme/ directory too.

@simahawk
Copy link
Contributor

I have been asked to squash history in the past, I believe it is still the process at OCA.

Normally we ask to squash fixup commits or little changes on top of another. Here we have a lot of work squashed on a commit that says only " Fix the module by adding a transaction to commit the token " which is just a tiny piece of your work 😉

🚑 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
Copy link
Member

@gurneyalex gurneyalex left a comment

Choose a reason for hiding this comment

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

Tested with Azure Active Directory. Works well.

@gurneyalex
Copy link
Member

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 15.0-ocabot-merge-pr-342-by-gurneyalex-bump-minor, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Mar 31, 2022
Signed-off-by gurneyalex
@OCA-git-bot
Copy link
Contributor

@gurneyalex your merge command was aborted due to failed check(s), which you can inspect on this commit of 15.0-ocabot-merge-pr-342-by-gurneyalex-bump-minor.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@gurneyalex
Copy link
Member

oca bot issue should be solved by #365

@gurneyalex
Copy link
Member

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 15.0-ocabot-merge-pr-342-by-gurneyalex-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 8d5f1d0 into OCA:15.0 Mar 31, 2022
@OCA-git-bot
Copy link
Contributor

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

gurneyalex pushed a commit to gurneyalex/server-auth that referenced this pull request Apr 7, 2022
Backport the refactoring of auth_saml done in OCA#342

🚑 Fix the module by adding a transaction to commit the token
🚑 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
gurneyalex pushed a commit to gurneyalex/server-auth that referenced this pull request Apr 11, 2022
Backport the refactoring of auth_saml done in OCA#342

🚑 Fix the module by adding a transaction to commit the token
🚑 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
@vincent-hatakeyama vincent-hatakeyama deleted the topic/15.0/auth_saml branch November 9, 2022 13:00
@yvaucher
Copy link
Member

Feedback on

📝 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.

This breaks auth_saml_environment module where the 2 key fields becomes non mandatory as we provide an alternative field with a path instead.

Also seems #315 is not addressed correctly as the required key fields seem to be conditional depending on signature.

yvaucher added a commit to yvaucher/server-env that referenced this pull request Mar 18, 2024
Restore the usage of the form view by dropping the required condition on
binary fields that are readonly.

Those fields became mandatory after to OCA/server-auth#342
but the module auth_saml_environment offer to use paths as a alternative config
option for binaries thus those fields can be empty.
@vincent-hatakeyama
Copy link
Contributor Author

The fields were changed to mandatory to avoid the issue, not to solve it. (I indicated for now but nobody proposed a fix since then).

yvaucher added a commit to yvaucher/server-env that referenced this pull request Mar 18, 2024
Restore the usage of the form view by dropping the required condition on
binary fields that are readonly.

Those fields became mandatory after to OCA/server-auth#342
but the module auth_saml_environment offer to use paths as a alternative config
option for binaries thus those fields can be empty.
yvaucher pushed a commit to yvaucher/server-env that referenced this pull request Mar 18, 2024
Restore the usage of the form view by dropping the required condition on
binary fields that are readonly.

Those fields became mandatory after OCA/server-auth#342
but the module auth_saml_environment offer to use paths as a alternative config
option for binaries thus those fields can be empty.
yvaucher pushed a commit to yvaucher/server-env that referenced this pull request Mar 18, 2024
Restore the usage of the form view by dropping the required condition on
binary fields that are readonly.

Those fields became mandatory after OCA/server-auth#342
but the module auth_saml_environment offer to use paths as a alternative config
option for binaries thus those fields can be empty.
SiesslPhillip pushed a commit to grueneerde/OCA-server-auth that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/server-auth (14.0)
guewen pushed a commit to guewen/server-env that referenced this pull request Feb 3, 2026
Restore the usage of the form view by dropping the required condition on
binary fields that are readonly.

Those fields became mandatory after OCA/server-auth#342
but the module auth_saml_environment offer to use paths as a alternative config
option for binaries thus those fields can be empty.
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.

7 participants