Pages

7/06/2020

SSO using OKTA credentials in IDCS

In this blog post, I would like to detail out the configurations that are needed for enabling SSO from OKTA to Oracle IDCS. The steps to be followed are

1. Federation Data download from IDCS.
2. Configure IDCS as an app in OKTA.
3. Add OKTA as a SAML IDP in IDCS.
4. Single sign-on logout configuration in OKTA.

Here is an explanation of each step.

1. Federation Data download

      Download federation metadata of IDCS using below url. Update the Identity Cloud service name in the highlighted part.
                     https://idcs-tenent.identity.oraclecloud.com/fed/v1/metadata
            Note the entityID field and  AssertionConsumerService Binding location in the downloaded federation metadata file.
2. Configure IDCS as app in OKTA

1.       Login to OKTA.
a.       Click on Admin à Click add application
b.      Click on Create new application


c.       Select SAML 2.0


d.      Enter App Name and other fields – leave as default


e.      Enter below information:
                                                               i.      SSO login  - Enter AssertionConsumerService Binding location from IDCS federation metadata
                                                             ii.      Audience URI – Enter Entity ID
                                                            iii.      Delay – Blank
                                                           iv.      Name ID - Unspecified
                                                             v.      Application Username – Okta Username

             

f.        In Group Attribute Statement enter
                                                               i.      Name = https://auth.oraclecloud.com/saml/claims/groupName
                                                             ii.      Name format = Basic

             

g.       Save the configurations
h.      Sign-in page of the application appears
.        

i. Download the Identity Provider metadata



j.  Create Groups and or users, who would need access in IDCS

3.Changes in Oracle IDCS
  1.   Open Settings à Identity Provider à Add SAML IDP. Enter name and press next.
     

2.Upload the metadata file downloaded during OKTA application configuration 

     
    3. User Attribute Mapping:
     a.       Choose Identity Provider User attribute as Name ID.
     b.      Choose Oracle Identity Cloud service user attribute as Primary Email Address and Requested Name Id Format as Email address. 


4.       In the next page, note the urls and download the certificates.


5.       Test the application, you will be directed to Okta to enter login credentials to verify the connectivity and  Activate the application.
6.       Click on the menu and select Show on Login page option.

          

7.       Open IDP Policies. Click on Default Identity Provider Policy.



8.       Click on  Identity Providers à Assign and select the Identity provider created and Click Ok.


9.       Launch CECS or any application url in oracle Pass cloud. An option to sign in with OKTA credentials will appear. 


10.   If redirection to OKTA sign-in page for login is needed, then go to IDP policies and Open default IDP policies -> Select Local IDP and click remove.



11.   When the cloud applications url is launched, it will redirect to Okta login page.

4.Logout configuration in OKTA

1. In Okta application administration page, make the following advanced settings for enabling logout.  
        a) Click on the application in Okta, Edit SAML settings 

     

b) Click Show Advanced settings


                   Fill in the below details taken from IDCS application configuration step 4.
a.       Single sign-out URL.
b.      Enter SP Issuer as IDCS
c.       Signature certificate – upload SigningCertificate.pem file downloaded.

 


Reference:

Regards,
Vijay

3/14/2014

UVA 927 - Integer Sequence solution

import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int tc = sc.nextInt();

while(tc-- >0) {
int [] num = new int[sc.nextInt()+1];
int ctr=0;
for(int i=0;i<num.length;i++) {

num[i] = sc.nextInt();
}
int d =sc.nextInt();
int k= sc.nextInt();
long v=0,c=0;

for(int i =0;c<=k;i++) {
c=c+ i * d;
v=0;
for(int l=0;l<num.length;l++ ) {

   v = (long) (v +  (long)num[l]* Math.pow(i,l));
}
if (c>=k){
System.out.println(v);
break;
}
}
}
}

}

3/11/2014

Uva 10340 -All in All solution

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String m = new String();
while((m=br.readLine())!=null) {

String[] arr = m.split(" ");
char[] a = arr[0].toCharArray();
int start=0;
for(int i=0;i<a.length;i++) {
int k =arr[1].indexOf(a[i], start);

if(k > 0) {
start= k+1;
}
if (k==-1 || start > arr[1].length()) {
System.out.println("No");
break;
}
else if(i==a.length-1) {
System.out.println("Yes");
}

}
}
}

}

3/09/2014

UVA Open Credit System - 11078 Solution

import java.util.Scanner;

public class Main {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int tc= sc.nextInt();
while(tc-- >0) {
int noOfStud = sc.nextInt();
int dif =-999999,max=0;
int marks[] = new int[noOfStud];
//int maxAr [] = new int[noOfStud-1];
for(int idx=0;idx<noOfStud;idx++) {
marks[idx]=sc.nextInt();

}
max=-9999999;
//int min = marks[1];
//maxAr[0]= max-min;


for (int idx=0;idx < noOfStud-1; idx++) {

if (max< marks[idx]) max= marks[idx];
if (max-marks[idx+1]>dif) dif = max-marks[idx+1];


}
System.out.println(dif);

}
}

}

UVA 102 Bin Packing Java Solution

import java.util.Scanner;

public class Main{

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
int [] bin_list = new int [9];
int [] total = new int[6];
for(int idx=0;idx<9;idx++) bin_list[idx] =sc.nextInt();

 total[1] = bin_list[3] + bin_list [6] + bin_list[1] + bin_list[7] + bin_list[2] + bin_list[5];
 total[0] = bin_list[3] + bin_list [6] + bin_list[2] + bin_list[8] + bin_list[1] + bin_list[4];
 total[4] = bin_list[4] + bin_list [7] + bin_list[0] + bin_list[6] + bin_list[2] + bin_list[5];
 total[5] = bin_list[4] + bin_list [7] + bin_list[2] + bin_list[8] + bin_list[0] + bin_list[3];
 total[2] = bin_list[5] + bin_list [8] + bin_list[0] + bin_list[6] + bin_list[1] + bin_list[4];
 total[3] = bin_list[5] + bin_list [8] + bin_list[1] + bin_list[7] + bin_list[0] + bin_list[3];

int min = 2147483647,min_idx=0;
for(int idx=0;idx<6;idx++) {
//System.out.println(" idx = " + idx + " value " + total[idx]);
if (total[idx]<min ) {
min=total[idx];
min_idx = idx;
}
}


switch(min_idx){
case 0 :
System.out.println("BCG " + min);
break;
case 1 :
System.out.println("BGC " + min);
break;
case 4 :
System.out.println("GBC " + min);
break;
case 5 :
System.out.println("GCB " + min);
break;
case 2 :
System.out.println("CBG " + min);
break;
case 3 :
System.out.println("CGB " + min);
break;
}
}
}

}