Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: The how - to of active directory authentication / integration

Chris Hickman October 16, 2011

Can anyone please confirm (or not) whether Tyler's script is up-to-date for JIRA 4.0?

3 answers

1 accepted

1 vote
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 16, 2011

What that sql does is rename a user... there is a lot of info here: https://jira.atlassian.com/browse/JRA-1549 which is more definitive than the old forums.

If your question is specifically about AD then I'd say no, that is not a good resource, but I'm not really sure what you're trying to do. Is it rename a user or integrate with AD?

0 votes
Chris Hickman October 16, 2011

Hi Jamie thanks for getting back on this (I hadn't realised it wasn't still a forum). The question related to an answer posted by Tyler Roobins relating to changing Active Directories - just wanted to know whether his script would still be valid for JIRA 4.0:-

Tyler Robbins


Posts: 5
Registered: 08/13/09

Re: The how - to of active directory authentication / integration
Posted: Jul 14, 2010 1:30 PM  global.in_response_to.tooltip in response to: David Denise
I was looking for a simpler way to migrate users over from local Jira accounts to Active Directory, so I wrote this SQL script below that can be run in SQL server or as a stored proc. We are on 3.13.4 with a SQL backend, could not say if this works for more recent versions.

Just replace the user_local with the original username and user_ad with the new AD username and execute it for each user.

From my testing, you can log in with the AD account immediately after running the script, but to properly associate the user to his projects I needed to restart Jira. And to make their existing assignments show on the Home Page, I had to run the Jira reindex.



declare @old_name varchar(20)
declare @new_name varchar(20)

set @old_name = 'user_local'
set @new_name = 'user_ad'

print 'old name = ' + @old_name
print 'new name = ' + @new_name

update jiraschema.changegroup set AUTHOR=@new_name where AUTHOR=@old_name

update jiraschema.columnlayout set USERNAME=@new_name where USERNAME=@old_name

update jiraschema.favouriteassociations set USERNAME=@new_name where USERNAME=@old_name

update jiraschema.fileattachment set AUTHOR=@new_name where AUTHOR=@old_name

update jiraschema.filtersubscription set USERNAME=@new_name where USERNAME=@old_name

update jiraschema.jiraaction set AUTHOR=@new_name where AUTHOR=@old_name

update jiraschema.jiraaction set UPDATEAUTHOR=@new_name where UPDATEAUTHOR=@old_name

update jiraschema.jiraissue set REPORTER=@new_name where REPORTER=@old_name

update jiraschema.jiraissue set ASSIGNEE=@new_name where ASSIGNEE=@old_name

update jiraschema.membershipbase set USER_NAME=@new_name where USER_NAME=@old_name

update jiraschema.OS_HISTORYSTEP set CALLER=@new_name where CALLER=@old_name

update jiraschema.portalpage set USERNAME=@new_name where USERNAME=@old_name

update jiraschema.project set LEAD=@new_name where LEAD=@old_name

update jiraschema.schemepermissions set perm_parameter=@new_name where perm_parameter=@old_name

update jiraschema.searchrequest set authorname=@new_name where authorname=@old_name

update jiraschema.searchrequest set username=@new_name where username=@old_name

update jiraschema.userassociation set SOURCE_NAME=@new_name where SOURCE_NAME=@old_name

update jiraschema.userbase set username=@new_name where username=@old_name

update jiraschema.worklog set AUTHOR=@new_name where AUTHOR=@old_name

update jiraschema.worklog set UPDATEAUTHOR=@new_name where UPDATEAUTHOR=@old_name

GO

Chris Hickman October 17, 2011

Thanks Jamie - just the link I needed. We're migrating from our own AD to the parent company's AD, so just wanted confirmation of which tables and columns to change at 4.0 (all usernames and emails will change).

Thanks also for Groovy-runner - it's been incredibly useful

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 16, 2011

Can you give a bit of context, eg what is "Tyler's script"?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events