Hi everyone,
We have extended Seraph and used JASIG CAS code (with some modifications) for Jira and Confluence and successfully implemented CAS SSO on Jira and Confluence since 2006.
For Confluence successfully implemented for Delegated Microsoft AD, the functions of 'Sync ADS groups upon login' and Create User/copy user from ADS upon login.
For Jira we are just implementing the functions of 'Sync ADS groups upon login' and Create User/copy user from ADS upon login.
There is a bit of canned java code one must put in the custom authenticator for Delegated UD, to implement the functions of 'Sync ADS groups upon login' and Create User/copy user from ADS upon login.
Joe Clark at Atlassian provided the canned code for Confluence years ago and its been working flawlessly.
I've taken this bit of code, modified it to work for Jira and its running successfully.
One last bit I need to do for it is wrap a few calls to UD methods in a single Transaction.
I plan to share the successful resulting code that extends JiraSeraphAuthenticator.
After a bit of research found Crowd should use Spring's way to get a handle on a 'TransactionManager' object.
I simple need to know which object to get as the 'TransactionManager'.
What is class name for embedded Crowd Transaction Manager?
NOT for Jira - for embedded Crowd.
Either I need the name or an example of java call to get a handle on it.
More detail:
I simply need to wrap a few calls in a single Transaction. (they update embedded crowd User Directory).
Plan to use Spring's way of doInTransaction.
TransactionDefinition transactionDefinition = new DefaultTransactionAttribute(TransactionAttribute.PROPAGATION_REQUIRED);
final EmbeddedCrowdUser user = (EmbeddedCrowdUser) new TransactionTemplate(getTransactionManager(), transactionDefinition).execute(new TransactionCallback()
{
public Object doInTransaction(TransactionStatus transactionStatus)...
The call to getTransactionManager() must return an object that is, or can be, the transaction handler for embedded crowd.
Believe I just need to know either the class name, or fill in the 'WHAT goes here' in below snippet that returns a transactionManager for embedded crowd.
private PlatformTransactionManager transactionManager;
private PlatformTransactionManager getTransactionManager()
{
if (transactionManager == null)
transactionManager = (PlatformTransactionManager) ContainerManager.getComponent("WHAT goes here?");
return transactionManager;
}
REF to this missing plumbing in Jira: https://jira.atlassian.com/browse/JRASERVER-66567
Thank you very much for your time and expertise,
Craig
Indiana University
----
https://developer.atlassian.com/help/#community
Created: https://ecosystem.atlassian.net/servicedesk/customer/portal/14/DEVHELP-944
Hi,
For completeness, here is my answer for Craig:
I've looked for similar transaction managers to replace this particular line of your Confluence Authenticator:
private PlatformTransactionManager getTransactionManager()
{
if (transactionManager == null)
transactionManager = (PlatformTransactionManager) ContainerManager.getComponent("transactionManager");
return transactionManager;
}
Apparently, Confluence has that bean definition which extends a HibernateTransactionManager. In contrast, generally, Jira does not use transactions and does not have beans unlike Confluence. We have the OfBizTransactionManager for OfBiz-managed entities and is actually used by embedded Crowd for Ofbiz related transactions. So, bottomline would be, for non ofbiz transactions, AFAIK, there's no way to execute several calls in a single transaction like what you have in Confluence.
Also, a suggestion, guessing you got the idea from this knowledge base for implementing CAS SSO, you can extend JiraSeraphAuthenticator but that would be risky because it can change anytime because it's not an API and might break your subclasses (at compile time and/or runtime) or you can safely implement Seraph's Authenticator or extend AbstractAuthenticator, also from Seraph.
Cheers,
Anne Calantog
Hi @Craig Solinski,
Can you please move this question to community.developer.atlassian.com ?
Cheers,
Anne Calantog
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.