Archive for October 2011

Cyberlink PowerDirector 10 installation

Here’s how I got it to work-

  • Install Demo copy – don’t bother with your license key, but run it once.
  • Install CyberLinkPDR10R_toUltra_1005_GM2_113320_VDE110929-04, and NOW try your license key. I opened an old project that uses H.264 and activated the codec at this step – but I don’t know if you need to.
  • Install CyberLink.110906_ContentP_I_PCP110812-04
  • Install CyberLink.110906_ContentP_II_PCP110812-05
  • Install CyberLink.CL_110829_RomancePackv3_MTP110329-03
  • Install CyberLink.1012_GM2_Patch_VDE110926-01

Posted October 29, 2011 by mmdmurphy in tips

Tagged with

Courion Tip – Generating user names

Here’s the scenario… Automatically generate user names for a target system.

  • Does the user already have accounts on similar targets?
  • If so, is it 8 characters or less?
  • Otherwise, calculate it as First Initial, First 7 characters of last name – BUT
    • Is it already taken?
    • If not, use it
    • If so, make the last character a number, and increment until you find one that is free.

So, here’s my solution.

Step 1 create a view showing any taken user name that ends in a number. WHY? Because using MAX() and the default sort order give the wrong results. For instance (pseudo code)

MAX(jbobz, jbob0) (thats the number 0 at the end) returns jbob0 – which isn’t what we want. We want the highest number.

CREATE VIEW [dbo].[dbv_SAPUsernames_ending_in_number]
AS
SELECT DISTINCT USERNAME
FROM         dbo.IDENTITYMAP
WHERE     (RIGHT(USERNAME, 1) IN (‘0’, ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘6’, ‘7’, ‘8’)) AND (TARGETID LIKE ‘%CLNT%’)

Next, create a stored procedure to handle the logic…

— =============================================
— Author: Dan Murphy
— Create date: 10/26/2011
— Description: Generate a users suggested SAP name for Courion workflow
— =============================================
CREATE PROCEDURE [dbo].[sp_GenerateSAPAccountName]
@Emp_id VARCHAR(50),
@SAPAccountName VARCHAR(50) OUTPUT
AS
BEGIN
— Temporary variable internal use only.
DECLARE @TempAccountName VARCHAR(50)
DECLARE @TempLength SmallInt

— SET NOCOUNT ON added to prevent extra result sets from
— interfering with SELECT statements.
SET NOCOUNT ON;
— Look to see if the user already has valid SAP account name
SELECT @TempAccountName = Username from IDENTITYMAP where profileuid = @Emp_id and TARGETID like ‘%CLNT%’
IF @TempAccountName is not null and LEN(@tempaccountname)<9
Begin
Select @SAPAccountName = UPPER(@tempaccountname)
Return 0
END

— Calculate SAP name if it isn't found – but make sure it's not already taken
SELECT @TempAccountName = UPPER(LEFT(first_name,1)+LEFT(last_name,7)) from PROFILE where EMP_ID = @Emp_id

— If the resulting name is available, return it.
IF @TempAccountName is not null and LEN(@tempaccountname)<9 AND @TempAccountName not in (select username from IDENTITYMAP where TARGETID like '%CLNT%')
Begin
Select @SAPAccountName = UPPER(@tempaccountname)
Return 0
END
— The resulting name must be already be in use
— If the resulting user name is less than 8 characters
–IF LEN(@TempAccountName) < 8
Select @TempAccountName = LEFT(@tempaccountname, 7)
Select @TempLength = LEN(@tempaccountname)+1

Begin
–Select Max([USERNAME]) FROM [ILM_PROFILE].[dbo].[dbv_SAPUsernames_ending_in_number] where USERNAME like @TempAccountName+'%'
Select @TempAccountName = UPPER(CASE
RIGHT((SELECT MAX(Username) from dbv_SAPUsernames_ending_in_number where USERNAME LIKE @TempAccountName+'%'),1)
WHEN '0' THEN @TempAccountName + '1'
WHEN '1' THEN @TempAccountName + '2'
WHEN '2' THEN @TempAccountName + '3'
WHEN '3' THEN @TempAccountName + '4'
WHEN '4' THEN @TempAccountName + '5'
WHEN '5' THEN @TempAccountName + '6'
WHEN '6' THEN @TempAccountName + '7'
WHEN '7' THEN @TempAccountName + '8'
WHEN '8' THEN @TempAccountName + '9'
ELSE @TempAccountName + '0'
END)
from IDENTITYMAP where TARGETID like '%CLNT%' AND USERNAME LIKE @TempAccountName +'%'
Select @TempAccountName = LEFT(@TempAccountName,@TempLength)

Select @SAPAccountName = @tempaccountname
Return 0
End
RETURN 0
END
GO

Posted October 28, 2011 by mmdmurphy in Courion Tip

Tagged with

Courion Tip – Action Items in a URL

I made passing these into a URL too hard, I was trying “Manage Requests” as 2 words, not one.

Add
Change
Enable
Disable
Delete
ManageRequests
ManageApprovals
CreateDelegations
DeleteDelegations
ManageJob

Our provisioning platform based products, AccountCourier and ComplianceCourier provide configuration options to automate many of the steps in the workflow.
Did you know that you can provide values for some of the selections in the URL Query string? See ACLogin.asp…
The values are can be taken from the Query string arguments of the URL….. sAction = Request.QueryString(“Action”) sUser = Request.QueryString(“User”) sAcct = Request.QueryString(“Acct”) sTargetID = Request.QueryString(“TID”) sTicketID = Request.QueryString(“Ticket”)
If a value is supplied, it is added to the array that is used to set BEHAVIOR macros.
If (sAction “”) Then arrayCnt = arrayCnt + 2 ReDim Preserve inArray(arrayCnt) inArray(arrayCnt-2) = “Action” inArray(arrayCnt-1) = sAction End If … …
Here is the call to assign values to the behavior macros. SetStateID( ACComm.SetBehavior(SessionID,inArray,Errors))
Using the URL I can pre-select the following information to go through the workflow.

https://mysystem/courion/WebSamples/AccessOptions/HTML/AccountCourier/default.asp?workflow=”SelfService”&Action=”Change”&User=”5000″&Acct=”ccourion”&TID=”SPACE&#8221;
This URL would auto select the Change action, after authentication steps.
It would also auto-select the User represented by ProfileUID, “5000” and then auto-select the “ccourion” account on the target “SPACE”.
My experimenting has found that the values supplied for the Query string arguments are case-sensitive to match for auto-selection.
This can be helpful for chaining a workflow to another without having the end user be aware that supplied data is limiting their decisions and selections and hene minimizing their actual workflow steps.
The URL has a maximum character limitation, however, so this best used when the information is for a small amount of data.
MSFT limits URL to 2083 for IE. http://support.microsoft.com/kb/q208427/

Posted October 21, 2011 by mmdmurphy in Courion Tip

Tagged with

Courion Tip – Deconstructing the Request

Another update – I have basically abandoned this, for the reason below. So, if it reads like I have stopped in the middle before completing it, I did.

================================

Update – there’s a table called Serialization, which contains some binary data. For a real request, this table has 13 rows. For my ‘fake’ request I have been trying to submit, there are no entries. I believe this is the heart of the matter.

=================================

The scenario is this… Requests for SAP accounts, where the user requests more than one SAP role, should ideally be submitted as separate requests. Seems like an understanding of the tables should make this possible.
The default RequestView and AttributesView contains the details of the request, obviously, but not in the format that is needed. So, as a first step,  where is the raw data stored? The AttributesView is defined as

SELECT c1.AttributeID, c2.AttributeName, c1.AttributeValue, c1.AttributeSecure,
c1.AttributeHidden, c3.AccountName, c4.TargetName,c5.ExternalName AS UserName,
c6.RequestID, c8.UserUniqueID, c7.TargetID, c1.Mode, dbo.StatusDict.StatusName
FROM
dbo.Requests AS c6 INNER JOIN
dbo.Accounts AS c3 INNER JOIN
dbo.Targets AS c7 INNER JOIN
dbo.TargNameDict AS c4
ON c7.TargetNameID = c4.TargetNameID ON c3.TargetUniqueID = c7.TargetUniqueID RIGHT OUTER JOIN
dbo.Users AS c8
INNER JOIN
dbo.ExternalName AS c5
ON c8.ExternalNameID = c5.ExternalNameID ON c7.UserUniqueID = c8.UserUniqueID ON
c6.RequestID = c8.RequestID LEFT OUTER JOIN
dbo.StatusDict ON c3.StatusID = dbo.StatusDict.StatusID LEFT OUTER JOIN
dbo.Attributes AS c1 INNER JOIN
dbo.AttributeDict AS c2 ON c1.AttributeNameID = c2.AttributeNameID ON c3.AccountUniqueID = c1.AccountUniqueID

So, the tables that we are interested in are

  • c1 = Attributes
  • c2 = AttributeDict
  • c3 = Accounts
  • c4 = TargNameDict
  • c5 = ExternalName
  • c6 = Requests
  • c7 = Targets
  • c8 = Users

Looking at Attributes table, it looks like the raw data for the request:

Attribute Attribute Attribute Attribute Attribute Account Attest Attest
ID Value Secure Hidden NameID UniqueID Mode OptionID Comments
1795 duser N N 44 419 C NULL NULL
1796 Pa55w0rd N N 45 419 C NULL NULL
1797 User N N 46 419 C NULL NULL
1798 off N Y 47 419 C NULL NULL
1799 off N Y 48 419 C NULL NULL
1800 N Y 1 419 C NULL NULL
1801 Dummy N N 49 419 C NULL NULL
1802 dummy.user@domain.com N N 50 419 C NULL NULL
1803 W10T N N 51 419 C NULL NULL
1804 EST N N 52 419 C NULL NULL
1805 ZC-PRD-USERS N N 53 419 C NULL NULL
1806 10/10/2011 N N 54 419 C NULL NULL
1807 ZC:BS_BASISTEAM, ZC:FI_PS_IT_LEAD, ZC:MD_OPERATIONS_B, ZC:MD_IT_SUPPORT N N 55 419 C NULL NULL
1808 N N 56 419 C NULL NULL
1809 p:dummy.user@DOMAIN.COM N N 57 419 C NULL NULL

So, the details of request 419 are here, and AttributeNameID 55 is the SAP Roles requested.
Now, what are the attributes? Here’s the contents of the AttributeDict table:

AttributeDict Table – partial
Attribute Attribute
NameID Name
……
9 Employee ID
10 First Name
11 Full Name
12 Last Name
……
28 Manager
29 Office Locations
30 DEPT_NO
……
43 Group Membership
44 Account – User name
45 Account – User password
46 Account : Last name
47 Account : Lock the User
48 Account: Deactivate the User Password
49 Address – First name
50 Address : Internet mail (SMTP)
51 Defaults – Start Menu
52 Logon data – Personal time zone
53 Logon data – User group
54 Logon data – Valid from
55 Roles
56 SNC – Unsecure communication permitted
57 SNC Name
58 From
59 Message
60 Subject
61 To

Next issue – what is the request ID number for this?
The AttributesView shows this as request ID 197
the select shows this as c6.RequestID, and c6 is from the Requests table
So…. to manually create a request, entries need to be made in the Requests table, and the Attributes table.
However, the RequestID also exists in the Users table:

And we need the AccountStatusView to convert from “AccountUniqueID” to “RequestID”

Posted October 10, 2011 by mmdmurphy in Courion Tip

Tagged with