Merge lp://staging/~guitarmanvt/canonical-identity-provider/saml2app into lp://staging/canonical-identity-provider/release

Proposed by Ricardo Kirkner
Status: Rejected
Rejected by: Ricardo Kirkner
Proposed branch: lp://staging/~guitarmanvt/canonical-identity-provider/saml2app
Merge into: lp://staging/canonical-identity-provider/release
Diff against target: 1343 lines (+616/-534)
16 files modified
django_project/config_dev/config/main.cfg (+4/-3)
identityprovider/schema.py (+7/-17)
identityprovider/tests/unit/test_views_saml2.py (+0/-384)
identityprovider/urls.py (+2/-9)
identityprovider/views/saml2.py (+0/-96)
identityprovider/views/utils.py (+6/-15)
requirements/install.txt (+1/-1)
ubuntu_sso_saml/models.py (+4/-0)
ubuntu_sso_saml/processors.py (+86/-0)
ubuntu_sso_saml/schema.py (+29/-0)
ubuntu_sso_saml/tests.py (+383/-0)
ubuntu_sso_saml/urls.py (+18/-0)
ubuntu_sso_saml/views.py (+62/-0)
webui/decorators.py (+1/-1)
webui/views/account.py (+2/-1)
webui/views/ui.py (+11/-7)
To merge this branch: bzr merge lp://staging/~guitarmanvt/canonical-identity-provider/saml2app
Reviewer Review Type Date Requested Status
Ricardo Kirkner (community) Needs Fixing
Review via email: mp+137544@code.staging.launchpad.net
To post a comment you must log in.
543. By John Samuel Anderson

Renamed saml2app to ubuntu_sso_saml; require +portal in Salesforce Portal email addresses.

544. By John Samuel Anderson

Require saml2idp 0.18

545. By John Samuel Anderson

Merged in changes from trunk.

546. By John Samuel Anderson

Replaced useless imports with doc-comment in ubuntu_sso_saml/models.py

547. By John Samuel Anderson

Fixed import to decorators (it was moved).

Revision history for this message
Ricardo Kirkner (ricardokirkner) wrote :

Change looks good but...

1. Why do we need to change the pycompat files?
2. Why do we still need to list saml2idp in the installed_apps setting?
3. fab test fails
- identityprovider.views.ui was renamed to webui.views.ui
- test_canonical_email_is_preferred fails

review: Needs Fixing
Revision history for this message
Ricardo Kirkner (ricardokirkner) wrote :

Ideally all saml2idp usage should be encapsulated within the ubuntu_sso_saml app

548. By John Samuel Anderson

Restored pycompat files.

549. By John Samuel Anderson

Fixed tests, including reference to renamed webui.views.ui and SalesForcePortalAssertionTestCase.test_canonical_email_is_preferred().

Revision history for this message
John Samuel Anderson (guitarmanvt) wrote :

Thanks for the review, Ricardo. Here are my answers:

Q1. Why do we need to change the pycompat files?
A1. I was curious about that, too. I don't actually recall removing them in the first place, so I restored them.

Q2. Why do we still need to list saml2idp in the installed_apps setting?
A2. The ubuntu_sso_saml views use templates defined in the saml2idp package. It has to be listed as an installed app in order for Django to find the templates.

Q3. fab test fails
A3. The tests are fixed in revision 549. Thank you for catching that; I verified that the tests pass now.

Revision history for this message
Ricardo Kirkner (ricardokirkner) wrote :

Looks better now, but I would try to see if there is not a way to get all saml2idp references to be completely encapsulated within the ubuntu_sso_saml app. That way, the identityprovider app has no knowledge at all of the saml feature and is completely decoupled from it.

As far as the new test goes (l. 1003) a more elegant solution (imo) would be to use a common function that is called from the test instead of calling super (as it's not a common practice to have parameterized tests this way).

Revision history for this message
John Samuel Anderson (guitarmanvt) wrote :

Ricardo,
Just out of curiosity, are you planning to replace the current SAML implementation?
John

On Jan 3, 2013, at 1:07 PM, Ricardo Kirkner wrote:

> Looks better now, but I would try to see if there is not a way to get all saml2idp references to be completely encapsulated within the ubuntu_sso_saml app. That way, the identityprovider app has no knowledge at all of the saml feature and is completely decoupled from it.
>
> As far as the new test goes (l. 1003) a more elegant solution (imo) would be to use a common function that is called from the test instead of calling super (as it's not a common practice to have parameterized tests this way).
>
> --
> https://code.launchpad.net/~guitarmanvt/canonical-identity-provider/saml2app/+merge/137544
> You are the owner of lp:~guitarmanvt/canonical-identity-provider/saml2app.

Revision history for this message
Ricardo Kirkner (ricardokirkner) wrote :

On Thu 03 Jan 2013 03:10:30 PM ART, John Samuel Anderson wrote:
> Ricardo,
> Just out of curiosity, are you planning to replace the current SAML implementation?
> John
>

No, but this redesign was so that we could eventually deploy the saml
part of sso as a completely decoupled service from the rest of sso, so
having it tightly decoupled is essential.

550. By John Samuel Anderson

Removed SAML-related code from identityprovider.utils; added rpconfig request.token in ubuntu_sso_saml.views.

551. By John Samuel Anderson

Set request.token in the session properly.

552. By John Samuel Anderson

Removed cruft.

553. By John Samuel Anderson

Merged in updates from trunk.

554. By John Samuel Anderson

Moved Saml2IdpSchema to ubuntu_sso_saml app.

Revision history for this message
John Samuel Anderson (guitarmanvt) wrote :

I have completely removed any last vestiges of saml2 from the identityprovider app. The only remaining references are optional. I have tested it by removing the saml2idp and ubuntu_sso_saml apps from the config files and verifying that the identityprovider works without the SAML 2.0 feature set.

I have even moved the Saml2IdpConfig configglue definitions out of identityprovider and into the ubuntu_sso_saml app. Please look at identityprovider/schema.py and let me know if the try/except import clause meets with your approval.

I have run the automated tests; they always fail for me, even with a clean checkout, so I'm not sure whether any of them are actually broken. Please run the automated tests and let me know if any of them fail for you.

Thank you.

Unmerged revisions

554. By John Samuel Anderson

Moved Saml2IdpSchema to ubuntu_sso_saml app.

553. By John Samuel Anderson

Merged in updates from trunk.

552. By John Samuel Anderson

Removed cruft.

551. By John Samuel Anderson

Set request.token in the session properly.

550. By John Samuel Anderson

Removed SAML-related code from identityprovider.utils; added rpconfig request.token in ubuntu_sso_saml.views.

549. By John Samuel Anderson

Fixed tests, including reference to renamed webui.views.ui and SalesForcePortalAssertionTestCase.test_canonical_email_is_preferred().

548. By John Samuel Anderson

Restored pycompat files.

547. By John Samuel Anderson

Fixed import to decorators (it was moved).

546. By John Samuel Anderson

Replaced useless imports with doc-comment in ubuntu_sso_saml/models.py

545. By John Samuel Anderson

Merged in changes from trunk.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.