-
Notifications
You must be signed in to change notification settings - Fork 11
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
SSP-2066_add_routes_and_controllers #45
base: master
Are you sure you want to change the base?
SSP-2066_add_routes_and_controllers #45
Conversation
d8d4fc7
to
f5170a1
Compare
f5170a1
to
5b93932
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #45 +/- ##
=============================================
+ Coverage 41.43% 67.86% +26.42%
- Complexity 204 340 +136
=============================================
Files 14 26 +12
Lines 654 1229 +575
=============================================
+ Hits 271 834 +563
- Misses 383 395 +12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ioigoume for all the work on this major update and improvement. I did some QA but have not yet read through the code changes. Most things worked great. I ran into the below issues
-
Overriding the CAS configuration for a specific service url did not work for me. See
'attrname' => 'uid', attrname
,attributes_to_transfer
, andauthproc
) for each CAS service url. That wasn't working for me. -
I couldn't get the Cas1 validate to work. It would always return
no
and have this errorcasserver:validate: internal server error. Missing user name attribute: 'uid'
-
I think this is a pre-existing issue. Basically HttpUtils changes the service url in ways that can be unexpected by the CAS client. For example if the service url was
https%3A%2F%2Flocalhost%2Fexample%3Fval%3Db%26val%3Dc
which has a query parameter?val=a&val=b
then SSP is dropping one of the those values. There are other similar issues with '+' and a couple other ambiguous parts of url spec. I think we can look at this in a separate PR (I think Option to redirect to exact service url #25 was my previous workaround). -
Spurious 'Header already sent' error in logs. If I do something like not send a
ticket
param to validate, I get the expected CAS error, but in the logs I also seeERR [TRdeaf66cb] Error creating session: Headers already sent.
.
I'll look through the code and unit tests during my next free block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ioigoume . I did a read through of the code. I've added some comments for things.
I think the main issue is that the per service CAS configs are not being used in Cas20Controller since it instantiates all the objects before the service url is resolved. I think that also means the test coverage for per service urls is not working. For us the things that change per service url are the attrname, attributes to transfer and authprocs.
Secondary would be proxy validate doesn't seem like it doesn't work. I think it is hard to know what working looks like (it probably won't be till the new year that I have a real world example)
Last bit is deciding if returning null
from a controller to make tests work is good or to use RunnableResponse. @tvdijen I wonder what your thoughts are on RunnableResponse - is that something you recommend we use to wrap SSP calls (like http urils or authsource->logout()) that won't return? or stick with using mocks on those and have the controller return 'null'?
I think the RunnableResponse is the right way @pradtke, because in the future our utilities will return a response-object .. This will also make it easier to find these cases once that happens. |
…r checkServiceUrl.Improve composer validate.
Closes #26