Granting security permission to applet

Hi,
I have an applet which writes a .txt file to local disk. I want to call it through Javascript. Can anyone pls let me know how I can grant security permission to my file writing applet through Javascript?
Thanks,
Prasanna

Hi Munsifuv. You might get more help on this and your other AX questions on an AX-specific forum. We can help with connecting Power Query to data sources, but aren't necessarily experts on configuring those sources.
Thanks,
Ehren

Similar Messages

  • Grant Permission in Applet

    I am writing an applet which needed to read and write files with user's local machine, so i need to grant the permissions.
    It seem the only way to grant the permissions for applets is needed user have some manually setup before running the applet. (Either modify the security policy
    file or and add trust cert. ).
    but i see some applets in the web and grant permission by a pop-up dialog
    and user only need to answer "yes" or "no". how can they do this? is this supported by Java Plug-in? and How can i do it ??

    Without policy file in your own class you can do this (i think NS only):
    (import netscape.security.PrivilegeManager;)
    try {
                   PrivilegeManager.enablePrivilege("UniversalLinkAccess");
                   System.out.println("\tUniversalLinkAccess Success!");
                   PrivilegeManager.enablePrivilege("UniversalPropertyWrite");
                   System.out.println("\tUniversalPropertyWrite Success!");
                   PrivilegeManager.enablePrivilege("UniversalPropertyRead");
                   System.out.println("\tUniversalPropertyRead Success!");
              } catch (netscape.security.ForbiddenTargetException e) {
                   System.out.println(
                        "\tFailed! Permission to read system properties denied by user.");
              } catch (Exception e) {
                   System.out.println("\tFailed! Unknown exception while enabling     privilege.");
                   e.printStackTrace(System.out);
              }

  • Problem in Granting permissions for Signed Applet

    Hi,
    I have signed my applet with my self generated certificate. The client browser has imported this certificate in his cacerts keystore as trustcacerts. When I grant permission for my client(manually,in the client machine), I have peculiar errors.
    Case 1 : grant codeBase "http://***.XXX.***.XX/-" { permission java.security.AllPermission; };
    This permission works fine. But the client is able to download all applets from the granted machine, including unsigned applets.
    Case 2: grant SignedBy "dcard" codeBase "http://***.XXX.***.XX/-" { permission java.security.AllPermission; };
    If I add the signedBy tag, this particular grant section is completely omitted by the system. That is, the browsers does not recognize the signedBy tag( & its entire grant block) and throws SecurityExceptions for accessing the local machine.
    Please help me to grant permission for the applet coming from a particular source AND signed by a particulr person.
    Thanks in advance,
    Rajesh
    Note : Plug-in is java1.3.0_02. The public certificate is imported as trustcacerts in all cacerts files in system.

    This is the complete Error :
    WARNING: Attempting to use HTTP Firewall Proxy Server
    due to security restrictions: org.omg.CORBA.INTERNAL: Can not find GateKeeper: java.security.AccessControlException: access denied (java.net.SocketPermission localhost:15000 connect,resolve) minor code: 0 completed: No
    org.omg.CORBA.INTERNAL: Can not find GateKeeper: java.security.AccessControlException: access denied (java.net.SocketPermission localhost:15000 connect,resolve) minor code: 0 completed: No
         at com.visigenic.vbroker.gatekeeper.BridgeEx.login(BridgeEx.java:102)
         at com.visigenic.vbroker.gatekeeper.BridgeEx.loginHelper(BridgeEx.java:71)
         at com.visigenic.vbroker.gatekeeper.BridgeEx.bind(BridgeEx.java:200)
         at com.visigenic.vbroker.interceptor.ChainBindInterceptorImpl.bind(ChainBindInterceptorImpl.java:42)
         at com.visigenic.vbroker.orb.ORB.bind(ORB.java:1196)
         at com.visigenic.vbroker.orb.ORB.bind(ORB.java:1361)
         at com.visigenic.vbroker.orb.ORB.bind(ORB.java:1171)
         at com.platform7.persona.acceptor.GacHelper.bind(GacHelper.java:299)
         at com.platform7.persona.acceptor.GacHelper.bind(GacHelper.java:295)
         at GenericApplet.init(GenericApplet.java:40)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    org.omg.CORBA.INTERNAL: Can not find GateKeeper: java.security.AccessControlException: access denied (java.net.SocketPermission localhost:15000 connect,resolve) minor code: 0 completed: No

  • Security-permission in Resource Adapter?

    I added this permission definition to the META-INF/ra.xml file:
    <security-permission>
      <description>Test SecurityPermission</description>
      <security-permission-spec>
        grant {
          permission java.security.SecurityPermission "getPolicy";
      </security-permission-spec>
    </security-permission>
    But when I run
    java.security.Policy policy = java.security.Policy.getPolicy();
    from the adapter code, I still get a java.security.AccessControlException:
    java.security.AccessControlException: access denied (java.security.SecurityPermission getPolicy)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:267)
    at
    java.security.AccessController.checkPermission(AccessController.java:394)
    at
    java.lang.SecurityManager.checkPermission(SecurityManager.java:540)
    at java.security.Policy.getPolicy(Policy.java:121)
    What do I do wrong (or have I found a bug ;) ???
    BTW: I try to set permissions to read an XML-file from the adapter's jars or rar.
    Hans Bausewein

    To answer my own question ;-)
    The adapter code should wrap the privileged code in a PrivilegedAction.
    I've found it in section 10.7 of J2EE Connector Architecture and Enterprise Application Integration by Rahul Sharma:
      http://developer.java.sun.com/developer/Books/j2ee/connectorch10.pdf
    Hans

  • How to give security permission for html file which is accessing a database

    there a applet code which is accessing database and i am placing that code in one folder in any drive and iam placing a
    applet tag in a html file and storing on desktop.
    now if i run that html file i am unable to connect to database and it is not not giving any exception errors.
    what is the security permission we have to provide for that html file.
    i want this solution immediately plz.

    sign your midlet suite and give the permission in the jad / manifest
    http://java.sun.com/j2me/docs/wtk2.2/docs/UserGuide-html/security.html

  • WLS 7.0 SP2 - deploy error using security-permission in weblogic.xml on Win NT (jdk1.3.1)

    I am trying to use this in my weblogic.xml and this is the error that I get:
    weblogic-web-app>
    <description>Test Web App</description>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jdbc/TestDSRef</res-ref-name>
    <jndi-name>TestJdbc</jndi-name>
    </resource-description>
    </reference-descriptor>
    <security-permission>
    <security-permission-spec>
         // grant ability to read any file
         grant codeBase "http://server/virtual_directory/-"
         permission java.io.FilePermission "<<ALL FILES>>", "read";
         </security-permission-spec>
    </security-permission>
    </weblogic-web-app>
    Error parsing descriptor in Web appplication "e:\bea7_2\user_projects\mydomain\.\applications\.wlnotdelete\wl_comp15697.war"
    [Path="e:\bea7_2\user_projects\mydomain\.\myserver\upload\ourpeople", URI="ourpeople.war"]
    Any ideas on what I might be doing wrong? When I remove the security-permissions,
    the application deploys fine.

    I am trying to use this in my weblogic.xml and this is the error that I get:
    weblogic-web-app>
    <description>Test Web App</description>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jdbc/TestDSRef</res-ref-name>
    <jndi-name>TestJdbc</jndi-name>
    </resource-description>
    </reference-descriptor>
    <security-permission>
    <security-permission-spec>
         // grant ability to read any file
         grant codeBase "http://server/virtual_directory/-"
         permission java.io.FilePermission "<<ALL FILES>>", "read";
         </security-permission-spec>
    </security-permission>
    </weblogic-web-app>
    Error parsing descriptor in Web appplication "e:\bea7_2\user_projects\mydomain\.\applications\.wlnotdelete\wl_comp15697.war"
    [Path="e:\bea7_2\user_projects\mydomain\.\myserver\upload\ourpeople", URI="ourpeople.war"]
    Any ideas on what I might be doing wrong? When I remove the security-permissions,
    the application deploys fine.

  • Adding security permission in java.policy

    Hi All,
    I need to set security permissions for applet.
    How we can add security permission in java.policy at runtime in java?
    Thanks in advance.
    Rakesh Kashnia

    search this site and the web for a tutorial on using java's security

  • Error while granting Java permission to Oracle user (schema)

    Hi,
    I am trying to grant java permission as sys to an Oracle schema 'RCA' as follows but am getting the error ORA-29532: Java call terminated by uncaught Java exception: java.lang.SecurityException: policy table update java.io.FilePermission, <<ALL FILES>>. Could anyone please tell me how to resolve this issue?
    DECLARE
    KEYNUM NUMBER;
    BEGIN
    SYS.DBMS_JAVA.GRANT_PERMISSION(
    grantee => 'RCA'
    ,permission_type => 'SYS:java.io.FilePermission'
    ,permission_name => '<<ALL FILES>>'
    ,permission_action => 'execute'
    ,key => KEYNUM
    END;
    Error at line 1
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.SecurityException: policy table update java.io.FilePermission, <<ALL FILES>>
    ORA-06512: at "SYS.DBMS_JAVA", line 752
    ORA-06512: at line 4
    Thanks in advance for your help.
    Regards,
    Raj
    Edited by: 906041 on 4/01/2012 18:31
    Edited by: 906041 on 4/01/2012 18:33

    below worked for me
    18:44:11 SQL> connect / as sysdba
    Connected.
    18:44:19 SQL> DECLARE
    KEYNUM NUMBER;
    BEGIN
    SYS.DBMS_JAVA.GRANT_PERMISSION(
    grantee => 'DBADMIN'
    ,permission_type => 'java.io.FilePermission'
    ,permission_name => '<<ALL FILES>>'
    ,permission_action => 'execute'
    ,key => KEYNUM
    END;
    18:44:20   2  18:44:20   3  18:44:20   4  18:44:20   5  18:44:20   6  18:44:20   7  18:44:20   8  18:44:20   9  18:44:20  10  18:44:20  11  18:44:20  12 
    PL/SQL procedure successfully completed.
    18:44:36 SQL> 18:44:36 SQL> 18:44:36 SQL> Edited by: sb92075 on Jan 4, 2012 6:45 PM

  • Grant read permission.

    Hi All,
    can anyone tell me that how to grant read permission on all tables of a database except tables that belong to system tablespace.
    Thanks

    Handle:      788442
    Status Level:      Newbie
    Registered:      Aug 14, 2010
    Total Posts:      58
    Total Questions:      17 (12 unresolved)
    so many questions & so few answers.
    how I can find out the tables name that not are in system tablespace.just modify the previously provided SQL

  • Granting roles permission to run packages created by somone else

    Hi there,
    I'm using Oracle 9i and I've written a package that has several functions that need to be run by a role other than the owner. I have 2 roles I granted execute permission on the package itself but when I log in to our app as another user with one of those granted roles, I get the 'insufficient privilege' error.
    My DBA mentioned something about doing a pl/sql wrapper. I did a search under wrap in the oracle index and came up with a wrap utility. If this is what he meant, I don't understand how that helps with permissions if the wrap util just encrypts my package. How do the roles get permission to run it then?
    Thanks
    Evita

    If you call the stored procedure from a PL/SQL block, there will be a problem that PL/SQL does not, by default, recognize privileges granted through a role. You can either make a direct grant or you can change the PL/SQL block to specify authid current_user.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Sql query to grant TRUNCATE permission to a table

    Need help to write sql query to grant TRUNCATE permission to a table

    sujnan wrote:
    Need help to write sql query to grant TRUNCATE permission to a tableThis would require DROP ANY TABLE privilege.
    However, this is a rather powerful privilege and should not be granted to non admin users.
    Alternatively you can create a stored procedure in table owner's schema which would truncate specified table.
    Grant execute rights on this SP only to required users.
    See an example below:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1458414958491
    You could(rather should) put in more validations in this SP to prevent users from truncating tables that they are not supposed to.

  • Granting "shutdown" permission

    For the past several hours, I have scoured the internet searching for an answer to what I thought would be a very simple question. Perhaps it is still a very simple procedure ... I am just at my wits end, though, as to how to do this.
    What I want is for a "normal" user to be able to shutdown the system. I am running Solaris 10 on x86. I have tried the following:
    Creating a new group, adding the users to this new group, and giving the group execute permission on /usr/sbin/shutdown. Did not work. I get the message "only the user root has permission to ... blah blah blah"
    Then I tried usermod with the following parameters:
    usermod -A solaris.system.shutdown [username]
    didn't work.
    I also made sure to newgrp [shutdown_group] before executing the shutdown command. Didn't work. (Did this after I added my users to the new shutdown group)
    I have also created new roles (using the roleadd command) - didn't work. I have tried granting "All" permission and roles. I have tried granting "System Admin" permission. All to no avail. I have tried combinations of all of the above; I've tried all of them a second time and rebooted after each and every attempt thinking that maybe - just maybe - all I needed was a simple reboot. This was at 12:00 this afternoon. It's now 6:00.
    Regardless of everything that I have tried, I continuously get the error message, "only user root has permission to execute /usr/sbin/shutdown"
    What simple thing am I missing? Any help would be greatly appreciated.
    Thanks,
    Caleb

    New to Solaris and I have the same problem. What did you mean by:
    For the past several hours, I have scoured the internet searching for an answer to what I thought would be a very simple question. Perhaps it is still a very simple procedure ... I am just at my wits end, though, as to how to do this.
    What I want is for a "normal" user to be able to shutdown the system. I am running Solaris 10 on x86. I have tried the following:
    Creating a new group, adding the users to this new group, and giving the group execute permission on /usr/sbin/shutdown. Did not work. I get the message "only the user root has permission to ... blah blah blah"
    Then I tried usermod with the following parameters:
    usermod -A solaris.system.shutdown [username]
    didn't work.
    I also made sure to newgrp [shutdown_group] before executing the shutdown command. Didn't work. (Did this after I added my users to the new shutdown group)
    I have also created new roles (using the roleadd command) - didn't work. I have tried granting "All" permission and roles. I have tried granting "System Admin" permission. All to no avail. I have tried combinations of all of the above; I've tried all of them a second time and rebooted after each and every attempt thinking that maybe - just maybe - all I needed was a simple reboot. This was at 12:00 this afternoon. It's now 6:00.
    Regardless of everything that I have tried, I continuously get the error message, "only user root has permission to execute /usr/sbin/shutdown"
    What simple thing am I missing? Any help would be greatly appreciated.
    Thanks,
    Caleb
    Navy_Coder
    Posts:2,097
    Registered: 4/29/06 Re: Granting "shutdown" permission
    May 21, 2007 12:27 AM (reply 1 of 1) (In reply to original post )
    DOH! A few beers later I figured out my problem ...... in the prof_attr file ... there are THREE colons ...
    I knew it was something stupid. Sorry for the wasted space ...
    Posts:2,097
    Registered: 4/29/06 Re: Granting "shutdown" permission
    May 21, 2007 12:27 AM (reply 1 of 1) (In reply to original post )
    DOH! A few beers later I figured out my problem ...... in the prof_attr file ... there are THREE colons ...
    I knew it was something stupid. Sorry for the wasted space ...

  • How to grant permission to applet on OS X

    I have a problem running an applet on Firefox 3.0.6 on OS X 10.5.6.
    The applet should open a local socket in listen mode for tunneling (it's the VPN applet from ZyXEL).
    But security settings prevent it from opening the port due to SocketPermissions missing 'listen'.
    Java Console:
    [starting up Java Applet Security @ Sat Apr 04 06:37:13 CEST 2009]
    Sat Apr 04 06:37:18 CEST 2009 JEP creating applet AppletVersion (https://test.ch/)
    SSLVPN Applet v4.5 ZyXEL
    <<< ProxyClassLoader: defined LiveConnectProxy class. >>>
    <<< Here're the permissions you've got: >>>
    <<< java.security.Permissions@82a033 (
    (java.net.SocketPermission test.ch connect,accept,resolve)
    ) >>>
    Is there a way to grant this applet the missing 'listen' permission?
    Adding it to local java.policy file had no effect.
    Strangely, the applet runs fine under Windows (Java 1.6)!
    Any suggestions?
    Thanks a lot!
    bue
    java -version:
    java version "1.5.0_16"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
    Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)
    Edited by: bue on Apr 3, 2009 9:52 PM

    install Microsoft Office, iWork or LibreOffice on your Mac

  • Granting SocketPermission using signed applet

    I have had a dream of locally caching a jar file for an applet so that all the code will be on the client machine after the first time the applet was loaded. Basically, I have a very thin applet composed of a jar class loader and a tiny applet which will check for a jar file on the client and download it from the server if it does not exist. These simple classes are in a signed jar file. Basically, this thin applet does the following:
    1) Check for the big, app jar file in c:\Temp
    2) If it does not exist, open a URL input stream and get the big jar
    3) instantiate a jar class loader object on the now local, big jar file
    4) load the "main" class
    5) use reflection to run its initialization method
    6) the application then attempts to open a socket to the server
    I get all the way to step 6 and this is where things go bad. As far as I can tell, the "thin" app loader class has permission to do anything it wants since it was downloaded from a signed jar - I haven't tried to do anything I was not able to do with this class. I think the problem arises because the app class came from a non-signed jar file and it appears to have all the typical applet restrictions. I can make URL connections to the local client (since that's where the code was loaded from), but not anywhere else.
    I was hoping all classes the "thin", privileged class loaded would inherit these privileges, but obviously the class permissions come from where the class was loaded from. This is a bummer and my guesses for solving this problem are:
    1) grant permission to the entry class for the app somehow (I tried something like this by executing the entry method for the app in a AccessController.doPrivieleged block - no luck)
    2) sign the app jar and somehow read and accept its certificate so that all classes loaded from this jar are privileged (I am not sure of how to do this)
    I am hoping someone might have an elegant solution to this problem as this is really the last step in my caching solution. By the way, the entry app class is not an applet itself if this is useful information to anyone. The "thin" applet is the only applet and just hands control off to the entry method of the main app class in the jar.
    TIA!

    Signing an applet provides it with the ability to run outside the sandbox. This does not automatically give the applet permission to do anything it wants. The applet must still request the desired permission before actually attempting an operation that requires that permission. Depending on the browser or whether you are relying on the Java plugin, you need to call the necesary security method first. I wrote a signed applet back in May 2000 which also needed socket permission. I don't have access to the code anymore so I cannot recall exactly the classes and methods you need to invoke. If you search the Signed Applets forum for my name, there are several messages that should help you.
    For example:
    http://forums.java.sun.com/thread.jsp?forum=63&thread=132336

  • Security issues with Applets

    I have a web server that has access to a database server as i am able to create web pages with ASP and connect to the database fine using a DSN, i have created a web page that contains an applet, the applet attempts to connect to the database but i get a security error, how do i overcome this security issue, the sucurity error looks like this:
    Exception: java.security.AccessControlException: accessdenied(java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
    Can anyone help??

    There is a java.policy file in
    C:\Program Files\JavaSoft\JRE\1.3.1\lib\security\java.policy
    And a tool you can use in
    C:\Program Files\JavaSoft\JRE\1.3.1\bin\policytool.exe
    You might have to tell the policytool.exe where to open the java.policy file.
    You can also just modify it in a text editor and save it as plain text when you are done.
    I don't know which permission you should look for, but you can try with
    grant {
    permission java.security.AllPermission;
    and remove or comment out the other lines. Make a backup of the policy file before you try it. Restart the browser.
    Note that you have to do this on all client machines that wants to run your applet.

Maybe you are looking for

  • How can I add KeyListener to JTable editor

    Hi, I want to know how can I add a KeyListener to a JTable editor? I want to capture the event when any of the cell in the jtable has a key typed.

  • Itunes needs a "party mode"

    I am hoping to have a party in the coming weeks and i know from past experience that windows has a party mode, which is great, as it allows guests to put music on without allowing them access to the rest of the computer. Is there any way i can achiev

  • Over delivery limit

    Hi,     I have set up overdelivery limit 10% in customer material info rerecord .     When I created delivery & changed del qty system allowed greater than 10% .     I am on ECC 6. What might be the reason or do I missing some settings. Thanks

  • HP ProBook 4530s, Windows 7 64 bit Blue Screen – Windows will not load

    How do I get Windows to open. I have been having trouble this past week, Windows starts to load (Starting Window), then the blue screen is dsplayed.  Earlier this week I was able to use a restore point in January, and Window opened, but that restore

  • Putting an image in a JFrame

    I'm trying to paint an image onto a JFrame. Im making a monopoly game and need to paint the board, and repaint it after every turn. I dont know how to put an image onto a JFrame and was wondering if anyone could give me a basic algorithm or code exam