Storing a secret string

Hi,
Our ATG based site has to make a call to a REST web services located in the cloud (somewhere on the internet). The call only executes when we send a secret api key along with it. This key is configurable. It can change over time. Normally we would store similar configuration strings in ATG nucleus property files. However, in this case, we do not want the key to be stored unencrypted on the file system of the ATG server.
We are now looking for some sort of vault in which we can store the key. Does anyone happen to know of such a solution? We checked if the Java keystore/keytool could help us but that requires a specific format. Any other suggestions are very welcome.
Thanks in advance,
Bart.

If you want to encrypt any sensitive information that is stored in a Nucleus component properties file, you can do that by providing an implementation of atg.nucleus.PropertyValueDecoder. Then within your component you can decode the value of encoded property before you actually use it.
http://docs.oracle.com/cd/E26180_01/Platform.94/ATGProgGuide/html/s0206decodingencryptedpropertiesinnuc01.html
PropertyValueDecoder has two variants of decode() method as: public String decode(String s) and public Object decode(Object o). There are two default OOB implementation provided also for PropertyValueDecoder which are atg.service.jdbc.SimpleLoginDecoder and atg.crypto.CipherPropertyValueDecoder. SimpleLoginDecoder uses the OOB class atg.core.util.Base64 for decoding the encrypted value in the properties file while CipherPropertyValueDecoder class can use a atg.crypto.Cipher object where you can have you own encrypt/decrypt implementations.

Similar Messages

  • Convert exponent stored in a string to decimal

    I have the value 8.000000000000+E01 stored in a string. I want to display the value as 80.
    Please help. Is there any standard function module for this ???

    Try this code -
    data: i_s type string value '1E-02',
    i_f type f, " value '1E-02',
    i_p(12) type p decimals 5.
    write: / i_s.
    i_f = i_s.
    write:/ i_f.
    i_p = i_f.
    write: / i_p.
    Regards,
    Amit

  • How to find out the type of the value stored in a string variable?

    Hi,
    How do i find out the type of the value stored in a string variable?
    for example,
    I have a string variable str, in which the following type of values wil be stored
    1) Intger
    2) Long
    3) boolean
    4) Char
    Is there any method to find out the type of the value, anything like str.getType()?. Please kindly help me. Thanks in advance.

    Hi All, i'm sorry for the double posting, by mistake it occured.
    Thanks for your replies, i have a string variable str, in which the value is stored and i have another string variable type, in which the type of the value is stored.
    For example,
    String str = "15";
    String type = "Integer";
    Is there any way to verify whether the value stroed in str is of type stored in the variable 'type'. I want to write a method of type boolean, it will throw true of the value stored in str is of type 'type'. Thanks

  • How to create an instance of a class which is stored in a String?

    I've class name stored in a String Object.
    now i've to create an instance of that class name.
    How?

    This is very dangerous ground because you give up compile-time safety, but you can get a Class object using Class.forName(String). Then you can use methods of the class Class to operate on it (including creating an instance).

  • Can I Execute a function whose name is stored in a string variable?

    Can I execute a function whose name is stored in a string variable?
    Like
    Depending on the condition I will stroed the name of the function in a string variable. Then using that string variable i want to execute the function.
    String str=��
    iVal an int can take ne value
    Switch(iVal)
    Case 1:
    str=�test1()�;
    Case 2:
    str=�test2()�;
    I want whatever function name is in str to be executed.
    ----------------------------------------------------------------------------------

    For just executing a method or two, reflection might be easier than beanshell (or it might not). For executing entire scripts, beanshell will be preferable over reflection.
    (I assume beanshell uses reflection under the hood, but I've never bothered to peek.)

  • How to create a new file  having a name that is stored in a string

    Hello friends i am new to java and i need your help .
    I have a string which will take different values at run time. I want to create a file which has the same name as stored in the string . Can anyone help me?

    The Java Almanac example I linked to uses createNewFile() - the API documentation is not particularly clear about exactly what happens if c:\some\value\assigned\at doesn't already exist. But you're only a small experiment away from finding out!
    Another page gives examples of directory creation.
    http://www.exampledepot.com/egs/java.io/CreateDir.html
    Once (or if) the file is created using a File then, yes, that File is the name of the file: parent directories and all. If you create a FileReader based on the File it will read from the right place.

  • Using an array name stored in a String in a Statement

    In my sequence, I build an array in one section and store it in a variable called Locals.Test_Array.
    I build the name of the permanent place I would like to store this array and store it in a string called Locals.SG_Test_Array_Name.
    I would like to move the values from Locals.Test_Array to the Station Globals Array name stored in Locals.SG_Test_Array_Name.
    For example:
    the string stored in Locals.SG_Test_Array_Name is "StationGlobals.Coolant_Temperature_Test_Array" (already created in Station Globals)
    What I am trying to do is this:
    Statement                        StationGlobals.Coolant_Temperature_Test_Array=Loca​ls.Test_Array  (this works)
    The Station Global Array name needs to change as the sequence executes and the data in Locals.Test_Array changes.
    What I need is something like this.
    Statement                         Locals.SG_Test_A​rray_Name=Locals.Test_Array  (where SG_Test_Array_Name is a string that holds the name of the array)
    Thanks, Big_Will

    Evaluate(Locals.SG_Test_Array_Name + " = Locals.Test_Array " )

  • Database toolkit stored procedure return String

    Hi all,
    How I can return the entire string from my stored procedure using the attached code ?
    With this code I only retrive the first caractere of the string return by the stored procedure.
    Thanks for your help.
    MHP

    It could be that there is something screwy with LV, but given that it uses standard interfaces for comm with the DBMS, I would not expect that. A much more realistic possibility is that the toolkit is mucking things up. (A fairly common occurrence.)
    Try bypassing the toolbox -- which you don't really need anyway -- an talk directly to the ActiveX or .net interface.
    Also, what DBMS? What drivers are you using?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to check the current time with a Stored  time in string format

    Hi All
    I would like to compare the system time with an existing time values which is allready there in String format..
    i mean i would like to check if the SysTime is inbetween 6:30 and 14:00
    I accomplished this in Oracle ..
    Select 'Y' from dual where to_date(to_char(sysdate,'HH24:MI '),'HH24:MI') between to_date('06:30','HH24:MI') and to_date('14:00','HH24:MI')
    But instead of checking the DB each and every time , the perfomance would be better if we can do this in our java code..
    Could some one provide me with a code to accomplish the above scenario..
    Thanks in advance..,.,

    import java.util.Calendar;
    Calendar rightNow = Calendar.getInstance();  // gets the current date and time to millisec
    Calendar earlyTime = Calendar.getInstance().set(Calendar.HOUR_OF_DAY, 6).set(Calendar.MINUTE, 30);
    Calendar lateTime = Calendar.getInstance().set(Calendar.HOUR_OF_DAY, 8).set(Calendar.MINUTE, 0);
    if (rightNow.compareTo(earlyTime)> 0 && rightNow.compareTo(lateTime) < 0){
    // do something
    }Try this.

  • How to run command stored as a string other than eval()

    hi,
    my code looks like this:
    function getById(ID){
        var returnArray=[];
        for(var i= 0;i<ID.length;i++){
            returnArray.push("sap.ui.getCore().byId"+'('+'"'+ID[i]+'"'+')');
        return returnArray;
    var x=getById(["miRequestDateDatePicker","miApprovalDateDatePicker"]);
            for(var i=0;i< x.length;i++){
                x[i]=x[i].concat(".setEditable"+'('+mode+')'+';');
                console.log(x[i]);
                //eval(x[i]);
    my array elements looks like this
    x[0]="sap.ui.getCore().byId("miRequestDateDatePicker").setEditable(true);" i need to run this code in place of //eval(x[i]),
    please suggest me a solution other than eval();
    regards
    Ajaay

    Try this instead
    var id;
       for(var i=0;i< x.length;i++)
                x[i]=x[i].concat(".setEditable"+'('+mode+')'+';');
                console.log(x[i]);
                   id = x[i].split('"')[1];  // which extracts the id from the string. mode variable is already there
                   sap.ui.getCore().byId(id).setEnabled(mode);
                //eval(x[i]);

  • Get class object for primitive datatype name stored in a string

    Hi,
    I have an array of Strings:
    String[] somePrimitives = {"int", "char", "void" };
    I want to achieve the equivalent of :
    for(int k = 0; k < somePrimitives.length; k++) {
    Class myClass = Class.forName(somePrimitives[k]); //Wont work
    We all know, we cannot do Class.forName("int") etc since "int" is not a path to
    an actual class - whereas Class.forName("java.lang.Integer") will work.
    Can anyone tell me how to achieve the above ?
    Of course, I don't want to have numerous hardcoded checking conditions like
    if(somePrimitives[k].equals("int")) return (Integer.TYPE);
    thanks.

    1. Why couldn't java provide me a simple provision to list all available primitives and their corresponding
    class mapping ? Why should I do the mapping...shouldn't the language have taken care of
    its provisions ?Yes, and native compilation on the fly, dynamic modification of classes, a sensible types system, usable Number tree, quasiquotation, access to the AST of the source, getting a method based on argument types rather than parameter types, etc. etc.
    2. Or even better they could have made the method
    Class.getPrimitiveClass(String primitiveDatatTypeName)
    as a public method. This would have solved the whole
    problem with a one line piece of code. Why did they
    have to make it non-public ???If you want it easy, go elsewhere.
    But seriously, the reflection capabilities were tagged onto Java as it grew, and were not designed to reflect the state of the art, but as a 'just enough to get by' solution. Most of the time people don't need it, so it's not there, any you have to roll your own.
    Pete

  • Refering a variable  value  whose name is stored in a string

    if the pgm is like this
    String abc= " marks";
    int marks = 65;
    using abc i want to refer the value of marks
    can any one help me ?

    Wow that sagely advise doesn't seem to be good at present:
    Google  Error  
    We're sorry...
    ... but we can't process your request right now. A computer virus or spyware application is sending us automated requests, and it appears that your computer or network has been infected.
    We'll restore your access as quickly as possible, so try again soon. In the meantime, you might want to run a virus checker or spyware remover to make sure that your computer is free of viruses and other spurious software.
    We apologize for the inconvenience, and hope we'll see you again on Google. :)

  • Can a structure be stored in a string using structure notation

    Is there any way to store a structure as a string, for
    example in a database, that could be converted runtime like
    javascript can with eval, something like <cfset
    tmp=Evaluate("{VarA=[1,2,3]}")>

    The closest you can come is if you want to serialize and
    deserialize the structure as a JSON object (JavaScript Object
    Notation).
    <cfscript>
    struct = StructNew();
    struct.key1 = "Key 1";
    struct.key2 = "Key 2";
    struct.key3 = "Key 3";
    myJSONStruct = SerializeJSON(struct);// converts the
    structure to a JSON string
    myStructBack = DeserializeJSON(myJSONStruct);
    </cfscript>
    <cfdump var="#myJSONStruct#" />
    <cfdump var="#myStructBack#" />
    Of course, you'll need to know how to use a JSON
    string/object in your JS for this to be helpful but this will
    convert your struct to a string representation and allow you the
    option to convert it back in CF, if needed.

  • Storing input in strings

    im reading strings in off a serial port using the simpleRead demo program. They come in every second or so. HOw would i store these in one long string that i could then search for correct section and do someting with this section????

    StringBuffer?

  • Storing foreign languages in a string

    Hi all.
    I have a multi-language application. It has a textfield that allows users to type in values in a language of their choice. This value is stored in a string. The class which contains this string will be serialized. My problem is how can I retrieve the value of that string, after de-serialization, and display it back to the user in the same language it was enter?
    My solution was to take the value the user has entered and convert it into unicode. Therefore, when I display the string, it will always be in the original language. Is there a better solution?
    thanks,
    Paul

    Strings are already in Unicode, you know. And you would have to do something to prevent the user from seeing what they typed in, if your code does what you say, so there must be something you haven't said.

Maybe you are looking for

  • Why wont this RUN and Set a New-Service..?

    PS C:\WINDOWS\system32> New-Service -Name RunSafe -BinaryPathName C:\Users\3steveco33_01\Skydrive\Documents\Adminstartup.ps1 -DisplayName 'Active Protraction Service' -Description Safety and Security -StartupType Manual -Credential 'Admin_01' -Depen

  • Duplicate Record

    Dear friend, i have form has master-detail, the detail block has id's and seq no's, and i have when validate item trigger on seq no that check if user use same id so ganna get message that duplicate recode is not allwoed, i put this code in iD(WHEN-V

  • Which is the BEST/most practical RAM to buy?

    Bought my PB last Nov of 2004 without any upgrades here in Japan. Since, I am getting tired of the COLOR WHEEL thing everytime I am just running few simple application - I am really thinking of upgrading my RAM to its fullest. However, since I am in

  • Define Statues for work area

    Hi Christoph , I appreciate your effort for this While using t-code: CBIH02 : In Restricting criteria for work Area Selection tab We have one field: Status having f drop down : Active, Inactive, I want to add two more values there. So where i can add

  • Where are the Auidio/ Video Settings

    Capture tells me to adjust the Audio/Video settings. Where are these settings and what do I set them to.