Where to store an API Key - properties or somewhere else.

I'm developing an ADF Faces application with 10.1.3.3 that uses the Google Maps API. This API requires that you obtain an api key - long indecipherable text string from Google that you use from the Javascript routines that call the API. I stored this key in a properties file in the ViewController project, that I bring into the page with the map with <f:loadBundle /> and I reference the api key with appropriate EL to get it from the file.
This works fine, but I have a deployment problem. Google produces API keys that are for a specific website, and don't work from any other site. So I have a different key for my deployed application than on my development workstation where I run the embedded OC4J for testing. Every time I redeploy, the API key from development overwrites the copy on the application server (OAS 10.1.3), and of course, since that is a different website, the Google stuff stops working until I fix the properties file on the application server and restart the application. I made a copy of the correct version of the properties file, so I can do this, but it is a pain.
By the way, because of firewall problems, I redeploy with the Enterprise Manager web console, and an EAR file, not with JDeveloper.
Is there a better way? Is there a better place to store the key so that it doesn't get updated on the application server when I redeploy? Is there a way I can tell JDeveloper or the application server not to overwrite the properties file when I redeploy?

Hello Jflack,
One thing I might suggest you do is to store the value in an application-scoped managed bean property that is initialized from the database. I currently do this for instance-specific (dev/prod/test/etc) values that need to change, such as the URL of a reporting server. In the constructor for this managed bean, I grab an Application Module, find a view object, execute it, and grab the values, stuffing them inside a bean property. You can then refer to the value in the page using an EL expression.
Not sure if this method is possible for you, but it works well for me.
John

Similar Messages

  • Where to store a cryptographic key

    Hello,
    I've used DES to chyper configuration files in my application, now I have to store the DES key in a safe place. The only solution i've found is to store if in the class that use that key but it seem an example of "Hard coding", what's the key rest always the same for all the software installation. There isn't a mechanism such a keyring to solve my problem? Do you have any ideas?
    Thanks in advantage.

    Olek wrote:
    Hi,
    Why a keystore is no safe place to store the key?
    From the API of the BouncyCastleKeystore :
    [...]however if you hard drive is in a bad part of town and you absolutely, positively, don't want nobody peeking at your things, this is the one to use, no problem! After all in a Bouncy Castle nothing can touch you[...]
    It's just wrong. The only safe place for keys is in an HSM or in an HSM controlled keystore.
    So if you store your keys in the store and only get them when needed without storing them in memory over a long time there should be no big security problem?!As a hacker I open up your program and find where you get the key from the keystore. I then add code to write out the key after you extracted it from the keystore. This will work for any language, not just Java, though it is very easy with Java.

  • Is it possible to let the installer write vpd.properties to somewhere else?

    Hi Experts,
    I want to check whether it is possible to let the installer write vpd.properties etc files into a local directory, but not always into /var/adm/siebel. Is there a way to do that?
    Thanks!

    Just curious. Why would you want to do this?
    <br>
    <br>
    Chung
    <br>
    <br>
    Application Management Blog

  • Where to store mysap.properties file?

    Hello,
    I'm trying to test application Test User Management under SAP J2EE engine of SRM UM. When I run page:
    http://mysite:54000/logon/TestUM
    there is an message:
    Test is disabled, please specify UM_TESTUM=true
    I assume that this "UM_TESTUM=true" setting should be put in mysap.properties file. My question is where to store mysap.properties file?
    Somewhere here?
    c:\usr\sap\SRM2_UM\j2ee\j2ee_40\cluster\server\services\servlet_jsp\work\jspTemp\logon\
    Thanks
    m./

    Path for tat file is:
    c:\sapmarkets\properties\mySAP.properties
    BR
    m./

  • Invalid API Key Error in Ecosign API

    I'm using the sample soap code(Developer kit) given by echosign api for testping, but it always show invalid api key error while i'm executing from terminal. Please give the solution as soon as possible, and i'm not able to get solution from google also.
    This is my API Key:
    Client Secret:
    6IaJHev8N48JbsZcM4Itggzt0pAHF0iS
    I tried with this comment in terminal:
    php demo.php https://secure.echosign.com/services/EchoSignDocumentService20?wsdl 6IaJHev8N48JbsZcM4Itggzt0pAHF0iS test
    This is demo.php file:
    <?php
    // get input
    array_shift($_SERVER['argv']);
    $Url = array_shift($_SERVER['argv']);
    $ApiKey = array_shift($_SERVER['argv']);
    $cmd = array_shift($_SERVER['argv']);
    $params = $_SERVER['argv'];
    if (!$cmd) print_usage();
    $S = new SOAPClient($Url);
    call_user_func("cmd_$cmd", $params);
    function cmd_test() {
        global $Url, $ApiKey, $S;
        print "Testing basic connectivity...\n";
        $r = $S->testPing(array('apiKey' => $ApiKey));
        print "Message from server: {$r->documentKey->message}\n";
        print "Testing file transfer...\n";
        $text = file_get_contents('../test.pdf');
        $r = $S->testEchoFile(array('apiKey' => $ApiKey, 'file' => base64_encode($text)))->outFile;
        if (base64_decode($r) === $text) {
            print "Woohoo! Everything seems to work.\n";
        else {
            die("ERROR: Some kind of problem with file transfer, it seems.\n");
    function cmd_send() {
        global $Url, $ApiKey, $S;
        list($filename, $recipient) = reset(func_get_args());
        $r = $S->sendDocument(array(
            'apiKey' => $ApiKey,
            'documentCreationInfo' => array(
                    'fileInfos' => array(
                        'FileInfo' => array(
                            'file'     => file_get_contents($filename),
                            'fileName' => $filename,
                    'message' => "This is neat.",
                    'name'    => "Test from SOAP-Lite: $filename",
                    'signatureFlow' => "SENDER_SIGNATURE_NOT_REQUIRED",
                    'signatureType' => "ESIGN",
                    'tos' => array( $recipient ),
        print "Document key is: {$r->documentKeys->DocumentKey->documentKey}\n";
    function cmd_info() {
        global $Url, $ApiKey, $S;
        list($doc_key) = reset(func_get_args());
        $r = $S->getDocumentInfo(array('apiKey' => $ApiKey, 'documentKey' => $doc_key))->documentInfo;
        print "Document is in status: {$r->status}\n";
        print "Document History: ";
        foreach($r->events->DocumentHistoryEvent as $_) {
            $keytext =
              $_->documentVersionKey
              ? " (versionKey: {$_->documentVersionKey})"
            print "{$_->description} on {$_->date}$keytext\n";
        print "Latest versionKey: {$r->latestDocumentKey}\n";
    function cmd_latest() {
        global $Url, $ApiKey, $S;
        list ($doc_key, $filename) = reset(func_get_args());
        $r = $S->getLatestDocument(array('apiKey' => $ApiKey, 'documentKey' => $doc_key))->pdf;
        //$r = base64_decode($r);
        file_put_contents($filename, $r);
    function print_usage() {
        die(<<<__USAGE__
    Usage:
      demo.php <URL> <API key> <function> [parameters]
    where the function is one of:
      test
      send <filename> <recipient_email>
      info <documentKey>
      latest <documentKey> <filename>
    test will run basic tests to make sure you can communicate with the web service
    send will create a new agreement in the EchoSign system, and returns a documentKey
    info returns the current status and all the history events for a given documentKey
    latest saves the latest version of the document as a PDF with the given filename
    __USAGE__
    --------------------------  End of file ---------------------------------------------------------------

    This is my API Key:
    Client Secret:
    6IaJHev8N48JbsZcM4Itggzt0pAHF0iS
    Client secret is not the same as an api key!
    in addition to the above, integration key or access codes can be had by going to personal preferences>access code and clicking the plus sign.

  • Where to store customized modelsuppo​rt2 and reportgen*​.seq files

    We currently put all customized model and front end sequences under c:\Documents and Settings\...\TestStand 4.1\Models etc. We have since customized modelsupport2.* and reportgen*.seq files found in Program Files\NI\TestStand 4.1\Components\Models\TestStandModels. Question is where to store these customized files. There is an assortment of subfolders under Documents and Settings\All Users\Documents\NI\TestStand 4.1.
    Solved!
    Go to Solution.

    What version of Windows do you have?
    The file structure in All Users\Documents\NI\TestStand 4.1 should be similar to that in Program Files\NI\TestStand 4.1.  Essentially they are equal.  The key is TestStand looks in the All Users Directory first.  If it doesn't find it there then it goes into the Program Files one.  You can verify this by opening your search directories (Configure>>Search Directories).  Look for a item in the list called Public components directory.  Look at the path for that.  The very next entry should be TestStand components directory.  Look at the path for that.  They both have Subdirs checked.  If you were to switch those around (meaning TestStand components directory before Public components directory) then TestStand would grab the default files and not the ones you modified.
    So you should put modelsupport2 in Documents and Settings\All Users\Documents\NI\TestStand 4.1\Components\Models\TestStandModels\modelsupport​2.*
    reportgen*.seq should go in the same folder.
    If those folders don't exist then create them.  You can probably get away without creating them and just placing it all in the base dir (Documents and Settings\All Users\Documents\NI\TestStand 4.1) but I recommend structuring it the same so you don't get confused and it has the same look and feel.
    Hope this helps!
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Google API Keys for GCM in Chromium looks like dont work

    I am trying to use the service of Push Messaging function of Chrome(Chromium), theoretically I have to get a ChannelId where the communication would be established between the browser and Google Cloud Messaging(GCM), in Chrome I can get that Channel without problems, but in Chromium I don't get Channel, I don't get error, only I don't have anything, I contacted some people in the forums for Chromium and they suggest that the API keys for this funcionality(Google CLoud Messaging) maybe are not correct or there is a problem with the API  keys embedded in the build of Chromium for Arch.
    I don't know if this is the correct place to post this question, the people of Chromium suggested me that I contact to the package mantainer to reviwe if there is a problem with these API keys.
    I am using Arch 3.9.4-1, Chromium 27.0.1453.93 (Build para desarrolladores 200836).
    If this is not the correct place to post this kind of question and somebody knows where can I post it please tell me, and if somedoby can help me with my question I would be thankful.
    Thanks in advance.

    Hi Gsaison,
    Do you have any progress on these issues? Im working on the same solution right now (SWV + GoogleMaps JS v3 ) I've got some weird issue when i try to spawn a StageWebView inside a View on IOS, it appears inside a scroller and is not open for finger interaction anymore. I use the eskimo framework, but then again, nothing fancy going on there for the rest. I've tried all of the the stage.stageScaleMode options but non of them work. Got any help?
    Kind regards,
    Roy

  • Flickr api key missing

    Why is Lightroom 3.2. asking from **me** the Flickr api key when I try to export to Flickr? It should be the responsibility of Lightroom to provide the key! There must be a bug in Lightroom that prevents exporting to Flickr.
    Kari

    clvrmnky
    I frequently see LR prompt me for the Flickr API key... and I let it pass as I usually just restart LR and it seems to work and I suspect that the LR team probably have more critical issues right now.   BUT, I do expect it to be fixed.
    I truly hope we are misinterpreting your views, if not I sincerely hope they do not reflect the views of the LR team otherwise I fear for the long term longevity of Lightroom.
    Lightroom should not be thought of as simply a RAW converter and DAM with the other "non-core convenience" bits bolted on the side considered second class baggage when it comes to maintenance and support... otherwise where is the line drawn.   What about Web Publishing, Slide Shows or even Printing?  
    I too have a long history in the software business and I know that if functionality is paid for and delivered "in the box" then rightly a customers (and mine) expectations will not be that these are just "examples" and they are certainly not advertised as such.     If you in are in any way related to the LR team I would hope that you could re-assure all that the LR team is likely to have a different view from yours.

  • Where microsoft stores the information of each file? like .....

    I would like to know where microsoft stores the information about each file in my computer,
    because I want to search a specific folder in my computer that contains more than 400 files
    and stores the name of each file and its size and the modified date of it in an
    Excel sheet?
    Please, tell how to do it
    it's urgent

    Firstly the platform independance of Java is maintained (in part) by allowing the JVM to negotiate with the Operating System and the developer to command only the JVM.
    Secondly the Security Mangager of Java would not being functioning correctly if you were able to access arbitary memory in this way.
    Thirdly, do you have no compassion for Linux users?
    It is possible to conduct this search using the Java Core API
    Bamkin

  • I have a file where I store my download music. When I click on "add music" to my ipod my music file opens, but rather than have to drag one song at a time to my ipod, how do I copy the entire file at once to my ipod. - steve

    Hi - I have a file where I store my downloaded music. When I plug in my ipod and click on "add music" my file appears. Rather than drag one song at a time, how can I download the entire list at once? - steve

    I am not doing it in ITunes, but i did down load the song from ITunes.  I loaded the song on to my Nano, but in my menu selections it doesn't show the song or the artist in any search format.  However, when i plug in my nano to my PC I see the Nano library on my PC drive listings and that song and artist are there.  I can click on the song and it will play in Windows media on my work PC.  I did notice that the format for most all the songs in my library on my Nano are MPEG - 4 audio Files. 
    Thanks for your help, Mel

  • Where we store in sap r/3

    Dear sir  we can uploaded old data in sap r/3. by lsmw and bdc. but where we store.
    thanks regards
    jitendra

    Hi,
    LSMW - Helps to transfer data from legacy system to SAP either one time or periodically.
    Steps -
    1. Import data (legacy data in spreadsheet tables and/or sequential files)
    2. Convert data (from source format to target format)
    3. Import data (into the database of the SAP application)
    a. Maintain Structure relations, field mapping and conversion rules.
    b. Data from legacy system is read
    c. Based on step a, the data gets converted
    d. The converted data is imported to R/3 system based onBatch input processing or Direct Input or through IDOC Inbound processing
    Regards,
    R.Brahmankar

  • I am getting an error message with my snap scan ix500 that says the Evernote is not installed properly.  I have uninstalled/reinstalled evernote but it still doesn't work.  Anyone know where evernote stores their files on a Mac/

    I am getting an error message with my snap scan ix500 that says the Evernote is not installed properly when I try to transfer it.  I have uninstalled/reinstalled evernote and the scan snap softward but it still doesn't work.  Anyone know where evernote stores their files on a Mac?  Or had this problem.

    Are there any dialog boxes popping up behind your Yahoo screen?
    I have intermittent problems attaching files in Yahoo mail and this is usually the reason.  I'm also using an iMac (10.7.3) and this is likely the problem.
    It is generally a Yahoo issue rather than a Mac problem.

  • Where Can I Buy Replacement Keys For Mid 2012 Macbook Pro Retina?

    Hi Recently my macbook pros right arrow key fell of, i didnt hit it or anything it just came of. i placed it back on and a day later it fell off agin, now i have lost that key. Where can i buy replacement keys for my mac?
    Product
    Mid 2012 Macbook Pro 15 inch Retina Display

    Ask your local Apple retailer.
    Check iFixit.com.
    Try searching Google.

  • Where is the WLSTUtil API documentation

    I've been playing around with Python/Jython and WLST.
    But I cannot seem to find the API for the WLST commands.
    I can get code completion in eclipse that gives me all the possible commands for a certain variable for a dataSource say. But where are the commands/API of each Jython class that WLST defines, documented?
    For instance, if I run a configToScript, I get a script that has the following lines:
    jdbcSR = create(dsName,"JDBCSystemResource")
    theJDBCResource = jdbcSR.getJDBCResource()
    theJDBCResource.setName(dsName)
    And in eclipse, theJDBCResource code completion shows me the methods on that member variable. But where is the documentation for that jython class.
    I looked here (http://download.oracle.com/docs/cd/E13222_01/wls/docs92/javadocs/index.html?weblogic/deploy/api/spi/WebLogicDeploymentManager.html) but that again does not contain the WLSTUtil class.
    BTW: I ran writeToIniFile and got:
    from weblogic.management.scripting.utils import WLSTUtil
    import sys
    origPrompt = sys.ps1
    theInterpreter = WLSTUtil.ensureInterpreter();
    WLSTUtil.ensureWLCtx(theInterpreter)
    execfile(WLSTUtil.getWLSTScriptPath())
    execfile(WLSTUtil.getOfflineWLSTScriptPath())
    exec(WLSTUtil.getOfflineWLSTScriptForModule())
    execfile(WLSTUtil.getWLSTCommonModulePath())
    theInterpreter = None
    sys.ps1 = origPrompt
    modules = WLSTUtil.getWLSTModules()
    for mods in modules:
    execfile(mods.getAbsolutePath())
    wlstPrompt = "false"
    ~
    That tells me that all the jython classes are in WLSTUtl class. Just need to get at the javadoc for it.
    The weblogic.management.scripting.utils package does not contain WLSTUtil as expected.
    Thanks
    Pankaj
    Edited by: [email protected] on Sep 28, 2009 8:42 AM
    Edited by: [email protected] on Sep 28, 2009 8:43 AM

    i couldn't find the api either however if you implement the class you will simply get compiler errors explaining what you left out.

  • Is there any way to access the thumbails-db, where finder stores its icons that are assigned to files?

    Is there any way to access the thumbails-db, where finder stores its icons that are assigned to files?
    Thats a SQLite-DB? Is it possible to access and export them? I´d like to use that Db to assign thumbs to files on my NAS.
    Thx!    

    Are the thumbnails & icons stored in the .DS_Store-File?
    When visible, how can I access the content stored in that file?

Maybe you are looking for