morincer / teamcity-plugin-saml

The plug-in adds ability to authenticate users by SAML-based SSO providers (like Okta, Onelogin etc.)
MIT License
24 stars 16 forks source link

No SAML Settings are displayed when Teamcity is configured for a custom context #51

Closed sm97 closed 3 years ago

sm97 commented 4 years ago

image catalina.out: https://gist.github.com/sm97/d21f0ad51c0e58c08598a11b799c2d98

morincer commented 4 years ago

Hi! Usually it means some troubles with JS. Would you please check if JS console in browser shows some errors?

sm97 commented 4 years ago

My Teamcity installation uses /teamcity context (Server URL: https://example.com/teamcity/) while your plugin does not use it.

 <!-- START EXTENSION CONTENT jetbrains.buildServer.auth.saml.plugin.SamlSettingsAdminPage: name:SAML Authentication: /plugins/saml-authentication/SamlPluginAdminPage.jsp -->

 <div id=app></div>
 <script src="/plugins/saml-authentication/admin-ui/js/app.js"></script>

  <!-- END EXTENSION CONTENT jetbrains.buildServer.auth.saml.plugin.SamlSettingsAdminPage -->
morincer commented 4 years ago

Ok, confirm. Internally the plugin is getting the path using TC-provided SDK and it seems that the SDK method doesn't honor custom context. Will check for possible workaround.

morincer commented 4 years ago

Fixed.

sm97 commented 4 years ago

@morincer Thanks alot. Unfortunatly I cannot rebuild updated version of this plugin. It fails while installing npm dependencies :( Could you please make a build for me?

morincer commented 4 years ago

Sure, grab release https://github.com/morincer/teamcity-plugin-saml/releases/tag/1.2.2

sm97 commented 4 years ago

@morincer Thanks again. I got it and SAML configuration page is not empty now. Though not all links are still functioning. For example, SP Metadata XML link goes to /app/saml/metadata.xml that cannot be found by tomcat :( Also clicking SSO login button redirects to /app/saml/login/ without prefix.

morincer commented 4 years ago

Ok, I'll check it

morincer commented 4 years ago

Ok, give then new version (1.3) a try.

sm97 commented 4 years ago

@morincer We are getting to finish line :) Now Teamcity redirects to / after successful SAML authentication. image

sm97 commented 4 years ago

@morincer Could you please build this version to test?

morincer commented 3 years ago

Fixed in 1.3.1

sm97 commented 3 years ago

Good job. Thank you! It works like a charm :)