Creating sandboxes with the admin api

I'm trying to write some code that creates sandboxes through
the admin api. For these sandboxes, I want to only enable a
specific set of functions. Unfortunately, when you create a sandbox
with getSecuritySandboxes, it enables all functions by default. I
therefore need to disable all the securable functions before
enabling the ones I trust. I've run into two problems in doing
this, and wondered if anyone had any advice.
1) The api provides a function called
getSecurableCFFunctions, which is meant to return all the functions
that can be secured. Unfortunately, the function list returned by
this function is not complete - it is missing createobject(com),
createobject(corba), createobject(java), createobject(webservice),
getgatewayhelper and sendgatewaymessage. There's no way of finding
out the enabled functions for a sandbox, so I've currently had to
resort to disabling all the functions returned by
getSecurableCFFunctions and then adding in the ones that I know are
missing. This approach is likely to be broken when future releases
of CF add new securable functions.
2) I use setDisabledCFFunction to disable functions, but can
find no way of disabling createobject(com), createobject(corba),
createobject(java) or createobject(webservice) with this function.
When I try, it throws an exception with this message: "This
function can not be added to the restricted function list.". These
functions are in the function list in the administrator, and I can
add them there. Is there any way of securing them through the api?
Any advice appreciated!
Thanks,
Max

Set up a "template" sandbox that has the permissions you
want, say E:\template. Then I think this will work:
obSandbox =
createObject("component","cfide.adminapi.security");
arDefaultSandbox = obSandbox.getSecuritySandboxes (
"E:\template" );
obSandbox.setSecuritySandbox ( directory = SandboxDirectory,
sandbox = arDefaultSandbox["E:\template"] );

Similar Messages

  • Create Meeting with the XML api

    is this only available with the licensed account? Im using a trial account now and it seems I cant create a meeting, the response is No Access and Denied.
    please do give me a feed back thanks.

    Hello,
    You have must need to login as Main Administrator. Then an then you can able to process with below API.
    https://example.com/api/xml?action=sco-update&type=meeting&name=October All Hands meeting&folder-id=2006258750&date-begin=2006-10-01T09:00&date-end=2006-10-01T17:00&url-path=October
    above red clored text need to changes as per your need.
    Please let me know if you get this one help you in further process.
    Thanks,

  • Create a Navigational Hierarchy for filtering with the Table API

    Hello,
    I've built a WAD report acourding to the how to document: "Create a Navigational Hierarchy for filtering with the Table API".
    It works great but i dont know How to make the hirarchey to show the key and the text.
    Please Advice.
    David

    Hi Kenneth,
    please have a look in the source of the executed Web Application. What is inside of the <div> with the id filter?
    You should also find a td tag with id hier_xyz with xyz the filter inside of the <div>-Tag with id filter.
    Also check whether you have a javascript error.
    Have a look on the Javascript function set_style. Perhaps you can paste it here, than I can have a look.
    Heike

  • Can I create a cert with the Java API only?

    I'm building a client/server app that will use SSL and client certs for authenticating the client to the server. I'd like for each user to be able to create a keypair and an associated self-signed cert that they can provide to the server through some other means, to be included in the server's trust store.
    I know how to generate a key pair with an associated self-signed cert via keytool, but I'd prefer to do it directly with the Java APIs. From looking at the Javadocs, I can see how to generate a keypair and how to generate a cert object using an encoded representation of the cert ( e.g. java.security.cert.CertificateFactory.generateCertififcate() ).
    But how can I create this encoded representation of the certificate that I need to provide to generateCertificate()? I could do it with keytool and export the cert to a file, but is there no Java API that can accomplish the same thing?
    I want to avoid having the user use keytool. Perhaps I can execute the appropriate keytool command from the java code, using Runtime.exec(), but again a pure java API approach would be better. Is there a way to do this all with Java? If not, is executing keytool via Runtime.exec() the best approach?

    There is no solution available with the JDK. It's rather deficient wrt certificate management, as java.security.cert.CertificateFactory is a factory that only deals in re-treads. That is, it doesn't really create certs. Rather it converts a DER encoded byte stream into a Java Certificate object.
    I found two ways to create a certificate from scratch. The first one is an all Java implementation of what keytool does. The second is to use Runtime.exec(), which you don't want to do.
    1. Use BouncyCastle, a free open source cryptography library that you can find here: http://www.bouncycastle.org/ There are examples in the documentation that show you how to do just about anything you want to do. I chose not to use it, because my need was satisfied with a lighter approach, and I didn't want to add a dependency unnecessarily. Also Bouncy Castle requires you to use a distinct version with each version of the JDK. So if I wanted my app to work with JDK 1.4 or later, I would have to actually create three different versions, each bundled with the version of BouncyCastle that matches the version of the target JDK.
    2. I created my cert by using Runtime.exec() to invoke the keytool program, which you say you don't want to do. This seemed like a hack to me, so I tried to avoid it; but actually I think it was the better choice for me, and I've been happy with how it works. It may have some backward compatibility issues. I tested it on Windows XP and Mac 10.4.9 with JDK 1.6. Some keytool arguments changed with JDK versions, but I think they maintained backward compatibility. I haven't checked it, and I don't know if I'm using the later or earlier version of the keytool arguments.
    Here's my code.
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.security.KeyStore;
    import java.security.KeyStoreException;
    import java.security.NoSuchAlgorithmException;
    import java.security.cert.CertificateException;
    import javax.security.auth.x500.X500Principal;
    import javax.swing.JOptionPane;
    public class CreateCertDemo {
         private static void createKey() throws IOException,
          KeyStoreException, NoSuchAlgorithmException, CertificateException{
         X500Principal principal;
         String storeName = ".keystore";
         String alias = "keyAlias";
         principal = PrincipalInfo.getInstance().getPrincipal();
         String validity = "10000";
         String[] cmd = new String[]{ "keytool", "-genKey", "-alias", alias, "-keyalg", "RSA",
            "-sigalg", "SHA256WithRSA", "-dname", principal.getName(), "-validity",
            validity, "-keypass", "keyPassword", "-keystore",
            storeName, "-storepass", "storePassword"};
         int result = doExecCommand(cmd);
         if (result != 0){
              String msg = "An error occured while trying to generate\n" +
                                  "the private key. The error code returned by\n" +
                                  "the keytool command was " + result + ".";
              JOptionPane.showMessageDialog(null, msg, "Key Generation Error", JOptionPane.WARNING_MESSAGE);
         KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
         ks.load(new FileInputStream(storeName), "storePassword".toCharArray());
            //return ks from the method if needed
    public static int doExecCommand(String[] cmd) throws IOException{
              Runtime r = Runtime.getRuntime();
              Process p = null;
              p = r.exec(cmd);
              FileOutputStream outFos = null;
              FileOutputStream errFos = null;
              File out = new File("keytool_exe.out");
              out.createNewFile();
              File err = new File("keytool_exe.err");
              err.createNewFile();
              outFos = new FileOutputStream(out);
              errFos = new FileOutputStream(err);
              StreamSink outSink = new StreamSink(p.getInputStream(),"Output", outFos );
              StreamSink errSink = new StreamSink(p.getErrorStream(),"Error", errFos );
              outSink.start();
              errSink.start();
              int exitVal = 0;;
              try {
                   exitVal = p.waitFor();
              } catch (InterruptedException e) {
                   return -100;
              System.out.println (exitVal==0 ?  "certificate created" :
                   "A problem occured during certificate creation");
              outFos.flush();
              outFos.close();
              errFos.flush();
              errFos.close();
              out.delete();
              err.delete();
              return exitVal;
         public static void main (String[] args) throws
              KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException{
              createKey();
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.io.PrintWriter;
    //Adapted from Mike Daconta's StreamGobbler at
    //http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=4
    public class StreamSink extends Thread
        InputStream is;
        String type;
        OutputStream os;
        public StreamSink(InputStream is, String type)
            this(is, type, null);
        public StreamSink(InputStream is, String type, OutputStream redirect)
            this.is = is;
            this.type = type;
            this.os = redirect;
        public void run()
            try
                PrintWriter pw = null;
                if (os != null)
                    pw = new PrintWriter(os);
                InputStreamReader isr = new InputStreamReader(is);
                BufferedReader br = new BufferedReader(isr);
                String line=null;
                while ( (line = br.readLine()) != null)
                    if (pw != null)
                        pw.println(line);
                    System.out.println(type + ">" + line);   
                if (pw != null)
                    pw.flush();
            } catch (IOException ioe)
                ioe.printStackTrace(); 
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.security.auth.x500.X500Principal;
    public class PrincipalInfo {
         private static String defInfoString = "CN=Name, O=Organization";
         //make it a singleton.
         private static class PrincipalInfoHolder{
              private static PrincipalInfo instance = new PrincipalInfo();
         public static PrincipalInfo getInstance(){
              return PrincipalInfoHolder.instance;
         private PrincipalInfo(){
         public X500Principal getPrincipal(){
              String fileName = "principal.der";
              File file = new File(fileName);
              if (file.exists()){
                   try {
                        return new X500Principal(new FileInputStream(file));
                   } catch (FileNotFoundException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                        return null;
              }else{
                   return new X500Principal(defInfoString);
         public void savePrincipal(X500Principal p) throws IOException{
              FileOutputStream fos = new FileOutputStream("principal.der");
              fos.write(p.getEncoded());
              fos.close();
    }Message was edited by:
    MidnightJava
    Message was edited by:
    MidnightJava

  • Create Folder with the name of expense report number in SHAREPOINT ?

    Hi All,
    iExpence - In expense report confirmation page. There is custom link.
    Requirement
    When user click on link, system should create folder with the name of expense report number in SHAREPOINT and copy copies of expense receipts in the created folder in SHAREPOINT.
    Please suggest.
    Thanks,

    OAF no api as such for this kind of customization. Rather try developing some web service or something similar which can be invoked from the custom link to do the job.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                   

  • How can i create messenger with java tv API on STB

    deal all.
    how can i create messenger with java tv API on STB.
    how can Xlets communicate each other?
    how?
    i am interested in xlet communications with java tv.
    is it impossible or not?
    help all..

    You can create a messenger-style application using JavaTV fairly easily. JavaTV supports standard java.net, and so any IP-based connection is pretty easy to do. The hard part of the application will be text input, but people have been using cellphone keypads to send SMS messages for long enough that they're familiar with doing this. This doesn't work well for long messages, where you really need a decent keyboard, but for short SMS-type messages it's acceptable.
    The biggest problem that you need to work around is the return channel. Many receivers only have a dial-up connection, ties up the phone line and potentially costs people money if they don't get free local calls. Always-on return channels (e.g. ADSL or cable modem) are still pretty uncommon, so it's something that you nee to think about. Of course, if you do have an always-on connection then this problem just goes away.
    This is really one of those cases that's technically do-able, but the infrastructure may not be there to give users a good experience.
    Steve.

  • PB with the Scorm API

    Hi,
    I am facing a problem with the lms API in the standard scorm
    html file included in captivate 1.
    most of the scos I have created with Captivate 1 for one of
    my courses contain several animations.
    so I have modified the scorm.html template in order so that
    each animation is able to call a javascript which will replace the
    object tag. The javascript gives the name of the captivate movie
    that has to be loaded and displayed.
    the first movie runs well, and sends the usual api commands
    to the lms. at the end of the movie, a javascript is called, with
    the name of the next animation to be run.
    that works perfectly, but from that moment, the animations
    are not able to send api commands to the lms.
    of course, I intercept the LMSCommit and LMSFinish commands
    and the cmi.core.lesson_status is set to incomplete.
    but still the problem and I don't understand why.
    does anyone have a solution to solve this issue ?
    thanks for help
    oldJaypee

    Is there any debugging mode you can use in the LMS to see
    what's happening?
    Perhaps your second animation is re-initiating the
    LMS_initialize
    function, which could be throwing it off?
    Really hard to say if you can't see what's going on 'behind
    the scenes'.
    Erik
    oldJayPee wrote:
    > the first movie runs well, and sends the usual api
    commands to the lms. at the
    > end of the movie, a javascript is called, with the name
    of the next animation
    > to be run.
    > that works perfectly, but from that moment, the
    animations are not able to
    > send api commands to the lms.
    > of course, I intercept the LMSCommit and LMSFinish
    commands and the
    > cmi.core.lesson_status is set to incomplete.
    Erik Lord
    http://www.capemedia.net
    Adobe Community Expert - Authorware
    http://www.adobe.com/communities/experts/
    http://www.awaretips.net -
    samples, tips, products, faqs, and links!
    *Search the A'ware newsgroup archives*
    http://groups.google.com/group/macromedia.authorware

  • [svn:osmf:] 13228: Updating ExamplePlayer to work with the latest API changes.

    Revision: 13228
    Revision: 13228
    Author:   [email protected]
    Date:     2009-12-30 04:33:34 -0800 (Wed, 30 Dec 2009)
    Log Message:
    Updating ExamplePlayer to work with the latest API changes.
    Modified Paths:
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/chromeless/ChromelessPl ayerElement.as
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextElement.as
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/traceproxy/TraceListene rProxyElement.as
    Added Paths:
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextDisplayObjectT rait.as
    Removed Paths:
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextViewTrait.as

    Revision: 13228
    Revision: 13228
    Author:   [email protected]
    Date:     2009-12-30 04:33:34 -0800 (Wed, 30 Dec 2009)
    Log Message:
    Updating ExamplePlayer to work with the latest API changes.
    Modified Paths:
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/chromeless/ChromelessPl ayerElement.as
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextElement.as
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/traceproxy/TraceListene rProxyElement.as
    Added Paths:
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextDisplayObjectT rait.as
    Removed Paths:
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextViewTrait.as

  • Problem with creating links with the WPC (SP14)

    Hi,
    I have a problem creating links with the WPC (SP14): When I want to create internal links (Browse and select the target item) via the right button (choosing a website as a reference link). If I do so I encounter the problems either that the linked site (outside the WPC) shows a blue background and/ or has no navigation frame (on the left side & no breadcrumb-navigation on top).
    If I create links with the left button in the WPC via URLs I have the problem with the inserted URL, because sometimes (I don't know why und when) some parts of the code in the URL changes, so that the linked Website is empty (besides the navigation fram - the content isn't displayed anymore). To me it looks like as if the originally website cannot be "found" anymore.
    Does anyone has the same problems and is eventually able to help me? This would be really great. Thanks!

    Hi,
    you have also to deploy the following file from Service Marketplace:
    Patch for SP14 for KMC WEB PAGE COMPOSER 7.00
    Than it will works. The best way is you deploy WPC SP 15.
    If you want i can send you this file via email.
    regards,
    Sharam
    Edited by: Seed mopo on Apr 28, 2008 11:45 AM

  • How to Create IView with the HTML Content

    Hi Friends,
    Give me steps how to create IView with the static html file.
    Regards,
    Lakshmi Prasad.

    Hello thr...
    follow the below link for the required steps.
    [KM Document iView|http://help.sap.com/saphelp_nw04/helpdata/EN/fc/cf14bcd42911d5994400508b6b8b11/frameset.htm]
    You need to upload the document onto KM. Then you will be able to create the KM Document iView.
    Cheers!!!
    Biroj Patro.

  • Formatted Search defined on an item added with the UI API

    Hello,
    I have added an Edit Text with the UI API on the Sales Orders form. It is visible and enable.
    I have linked a Formatted Search to this Edit Text.I have indicated to refresh the value on Supplier Name changed.
    I have linked the same formatted search to the Remarks field with the same conditions of launching.
    When I change the BP name, the formatted search on theremarks field is launched, but the formatted search on the Edit Text is not launched.
    Why the formatted search on the Edit Text is not launched when the condition for refresh is true?
    Thanks for your help.
    Best regards,

    Hi,
    This is a simple Edit Text which is not bound.
    I can launch manually the formatted search, but it is not launch automatically!
    It seems that SBO can't launch automatically FS on user forms and user items.
    I have tried to define a FS on the Fixed Asset master data form and you can only launch the Formatted search manually.

  • [svn] 1267: fixed . patch creation to create patch with the selected files only, remove, fix newlines in the patch file.

    Revision: 1267
    Author: [email protected]
    Date: 2008-04-16 17:02:53 -0700 (Wed, 16 Apr 2008)
    Log Message:
    fixed .patch creation to create patch with the selected files only, remove, fix newlines in the patch file.
    Modified Paths:
    flex/sdk/trunk/tools/diffpack/diffpack
    flex/sdk/trunk/tools/diffpack/readme.txt

    All,
    I thought it may be related to spaces in the path in which the script was called from. I tried having the ODBC command script in another directory but the same thing happens. It will give me the "CONFIGSYSDSN: Unable to create a data source for the 'Oracle in OraClient10g_home1' driver: Could not load the setup or translator library with error code -2147467259". As soon as the script is done running I can manually double click the script and it adds the DSN fine.
    Thanks,
    Clif Bridegum

  • How can I create a new User with the Java API like OIDDAS do?

    Hello,
    I'm currently working on an BPEL based process. And i need to create an OCS user. So far I can create an user in the OID. But I cant find any documentation about given this user an email account,calendar and content function etc.
    Did anybody know if there are some OIDDAS Webservices? Or did anybody know how to do this using the Java APIs?

    You are asking about a Database User I hope.
    You can look into the Oracle 8i Documentation and find various privillages listed.
    In particular, you may find:
    Chapter 27 Privileges, Roles, and Security Policies
    an intresting chapter.
    You may want to do this with the various tools included with 8i - including the
    Oracle DBA Studio - expand the Security node and you can create USERS and ROLES.
    Or use SQL*Plus. To create a
    user / password named John / Smith, you would login to SQL*Plus as System/manager (or other) and type in:
    Create user John identified by Smith;
    Grant CONNECT to John;
    Grant SELECT ANY TABLE to John;
    commit;
    There is much more you can do
    depending on your needs.
    Please read the documentation.
    -John
    null

  • How to retrieve all the tasks for a UserView with the worklist api 10.1.3.1

    Hi,
    I have defined a custom view for user jcooper. The view just displays all the current uncompleted tasks for jcooper.
    I want to use the worklist api to retrieve all the tasks in the view. I first tried it with the following function call:
    taskQueryService.queryViewTasks(workflowContext,viewName, null, null, 0, 0);
    assuming that the viewId in the corresponding java-doc corresponds to the name of the view..However this doesn't work and the method returns a null reference. So viewId is something different than a viewName. Because I cannot find the corresponding viewId for my view (not looked in the db yet, but I don't want to use these ids in my app), I tried the method:
    client.getUserMetadataService().getUserTaskViewList(workflowContext, Partcipant participant);
    However I did not find a method to retrieve a Partipant instance for jcooper in the worklflow api documentation.
    My question now is if someone can help me out to retrieve all the tasks for a specific view. I should be possible I think...
    Thanks!
    Kind regards,
    -Tom

    The second argument (Participant) was added to handle the use case where one user such as an admin or manager needs to retrieve user metadata of another user (offcourse with the required security checks). We will try to do a future enhancement such that if the pariticipant is passed as null then we will assume the metadata is to be retrieved for the workflow context user.
    For now you can define a simple method to create a participant from a workflow context as follows and pass this as an argument to the UserMetadataService call:
    private Participant createParticipant(workflowContext)
    Participant participant = new oracle.bpel.services.workflow.common.model.ObjectFactory().createParticipant();
    participant.setName(workflowContext.getUser();
    participant.setRealm("jazn.com");
    participant.setType("USER");
    return participant;
    // code to retrieve task list...
    UserViewList views = client.getUserMetadataService().getUserTaskViewList(
    workflowContext, createParticipant(workflowContext))
    ...

  • Serializing objects with the NIO API

    I try to use the new IO API to implement a non-blocking multi-threaded server that communicates with client applications by exchanging serialized objects. I started from the code in the JavaWorld article at http://www.javaworld.com/javaworld/jw-09-2001/jw-0907-merlin.html .
    With the new features of J2SDK 1.4.0, you don't have to create a separate thread per connected client. That is a big improvement.
    But when I read an object with ObjectInputStream, I get a java.nio.channels.IllegalBlockingModeException.
    Has anybody successfully implemented such a server since the release of the new io API?
    Thanks.
    Jean-Robert

    The ObjectStream code is basically incompatible with non blockin I/O since you must block on the stream until a whole Object is available. You could roll something like this yourself, by reading bytes until there are enough available to build the next object and then getting that Object from the buffer and shipping it to your client thread. All of this is far more trouble than just using the Stream oriented I/O.
    NIO and mutilple threads are a nightmare, the whole idea of non-blocking I/O is to avoid needing multiple threads. If you do use multiple threads you will need queues between them. See the Taming the NIO Circus topic for lots of discussion of NIO and its problems. The system seems more stable in JDK 1.5, but most people haven't even started using 1.4 for production yet.
    Personally I avoid ObjectStreams. They are only useful between Java applications, if I want that I just use RMI and let Java do ALL the hard work. When I write a Socket based app, its probably because the other end is a mainframe of a C program. For that reason I send data as bytes, packaged up in packets, and encode as XML or ASN.1 so the other end can interpret it.

Maybe you are looking for

  • How can I solve the problem with copying text from Google Documents?

    Ctrl+C and Ctrl+X are not always working in Google Document opened with Mozilla Firefox 30. This problem first occurred 2 days ago. No changes to the software were made. The problem is not stable and permanent. I can successfully copy several lines f

  • Data services management console deployment on weblogic

    I have installed SAP installation platform services 4.1 sp2 without Tomcat server. I have deployed BI applications using Weblogic 11 and they are working fine. I have installed SAP data services on top of it. Installation runs fine. I am not able to

  • Customer exit for post_popup

    Hi, I've created a BEx query and added a variable MCE9004 in field Ref.org.unit and this variable is mapped to a customer exit code via CMOD step 2 (post_popup). Basically how I want it to work is, I will select an org.unit value e.g. org.unit = A1 i

  • Difficulty in downloading adobe reader

    I have a new hp pc with windows 7 and I could not open some e-mail messages and then it told me that I needed to download a free copy of adobe reader.  When I attempted to download it would go just so far(59.76%) and sit there for hours and not compl

  • Can I correct for an image that is distorted: should be square, is not?

    I'm working with some photos of flat art work. The camera was not aligned perfectly, so the images are not quite square. Can I use Photoshop to correct for this?