Need suggestion on security

Hello,
I need some suggestions on what might be the best way to handle security in my application.
The application acts as a control panel with an initial login screen. When a user logs in it needs to be given access to certain menus and buttons based on the user group in which it belongs. The user groups need to be configurable (so policies will change over time).
Is JAAS a viable solution? I am not concerned with the OS level of security. The application needs its own level of security. For example, user JohnDoe logs in to application. JohnDoe belongs to the GroupA user group. GroupA has AccessPrivsA, which currently allows him to view menus A B and C. Later on AccessPrivsA is changed by user Admin to only have access to menus A and B.
Any ideas fellas?

JAAS will allow you to authenticate the user and to obtain the users credentials via the OS or another source (depending on the LoginModule used) but it will not allow you to control access to various features in your application. For this you need to create an ACL (Access Control List) based framework within your application. An ACL is a list of groups/users that have a certain privileges. You would create an ACL for each of the features within your app that you want to control access to. The various classes within your app could check with the ACL management system to see if the current user has access to a specific feature. For example assume the following (not thread safe) code:
public class AclMgr{
  private AclMgr _singleton;
  private HashMap _aclmap;
  private Subject _subject;
  private AclMgr(){
    _aclmap = new HashMap();
    // read in the ACLs and store in HashMap. This could be in a properties file.
    // e.g.
    // #My ACL property file
    // #format: feature=ACl
    // view.sensitve.data=ADMIN,SUPER
    // get a reference to the current Subject (which is essentially the user with credentials).
    // This assumes your using JAAS - you could also roll your own if you choose to.
    _subject = UserAuth.getInstance().getCurrentSubject();
  public static AclMgr getInstance(){
    if(_singleton == null){
      _singleton = new AclMgr();
    return _singleton;
  public boolean isAuthorized(String feature){
    boolean authorized = false;
    if(_aclmap.containsKey(feature)){
      // check the Subjects credentials (groups etc) against the ACL for this feature.
      // if the user is in a group that exists in this features ACL then set authorized=true .
    return authorized;
public class MyJFrame extends JFrame{
  public MyJFrame (){
    super();
    // set up the UI
    // when we get ready to see if we add a feature then do something like this:
    if(AclMgr.getInstance().isAuthorized("view.sensitve.data")){
      // the user has access so add yer button!
}Of course, this is overly simplified but gets the general idea across. We have implemented something similar in our Enterprise application and it works nicely. With a little more work you can probably provide an UI for authorized users (admins etc) to edit Access Control Lists for various features. Security will be increased if you store the ACL property file on a server somewhere so you can control access to its editing. Or even store it in a Database� lots of fun to be had here ;-)
Hope this helps,
Shane

Similar Messages

  • Why do they need credit card security code to download load a free app

    I have the iBook app and have been notified of an update, when I selected install I was asked fro my credit card security number, which after the recent press were hundreds of apple members personnel details had been stolen this is a bit naughty until they prove they are trust worthy, I feel that as they already have the information from when I purchased the iPad and many other apps a free upgrade does not need such high security. Unless I'm wrong, please tell me why?

    I've missed the press reports about stolen details but I have heard of fraudulent purchases being made on accounts where the Apple ID & Password have become compromised. Not so long ago I found myself having to a one-time revalidation of my credit card and also tighten up my password. You might also be prompted for details if your credit card on file expires. I'm sure you would prefer that you and you alone got access to your account so I would suggest you perform the account validation and then remove your credit card from file - i.e. switch your payment method to none. You should be able to obtain free updates thereafter, at least until the next major tweak to security demands we all revalidate ourselves.
    (Actually, I think you might be asked for some additional info. each time you use a new device to try to access your account which again would be a positive anti-fraud strategy)
    tt2

  • Need Suggestion for Archival of a Table Data

    Hi guys,
    I want to archive one of my large table. the structure of table is as below.
    Daily there will be around 40000 rows inserted into the table.
    Need suggestion for the same. will the partitioning help and on what basis?
    CREATE TABLE IM_JMS_MESSAGES_CLOB_IN
    LOAN_NUMBER VARCHAR2(10 BYTE),
    LOAN_XML CLOB,
    LOAN_UPDATE_DT TIMESTAMP(6),
    JMS_TIMESTAMP TIMESTAMP(6),
    INSERT_DT TIMESTAMP(6)
    TABLESPACE DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 1M
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    LOB (LOAN_XML) STORE AS
    ( TABLESPACE DATA
    ENABLE STORAGE IN ROW
    CHUNK 8192
    PCTVERSION 10
    NOCACHE
    STORAGE (
    INITIAL 1M
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOCACHE
    NOPARALLEL;
    do the needful.
    regards,
    Sandeep

    There will not be any updates /deletes on the table.
    I have created a partitioned table with same struture and i am inserting the records from my original table to this partitioned table where i will maintain data for 6 months.
    After loading the data from original table to archived table i will truncating the original table.
    If my original table is partitioned then what about the restoring of the data??? how will restore the data of last month???

  • I want to set up the Time Machine and I would love to use the Time  Capsule but since I already have a wireless router I need suggestions on  what other external disks Apple could recommend to use with the Time Machine and  how to configure that disk

    I want to set up the Time Machine and I would love to use the Time
    Capsule but since I already have a wireless router I need suggestions on
    what other
    external disks Apple could recommend to use with the Time Machine and
    how to configure that disk.
    A complication that I need to resolve is the fact that I am using Vmware
    Fusion to be able to use Windows on my Mac. Now it seems that Time
    Machine is not backing up my files
    on that virtual Windows without additional configuration and my question
    is whether you can advise me here or whether this is only a matter for
    the Fusion virtual machine.

    If you want to use Time Capsule you can.. you simply bridge it and plug it into the existing router.. wireless can be either turned off or used to reinforce the existing wireless.. eg use 5ghz in the TC which is much faster than your 2.4ghz.
    You can also use a NAS.. many brands available but the top brands are synology, qnap and netgear readynas  series. These will all do Time Machine backups although how well always depends on Apple sticking to a standard. There are cheaper ones.. I bought a single disk zyxel which was rebadged and sold through my local supermarket. It actually works very well for TM at least on Snow Leopard. Major changes were made in Lion and again ML so do not instantly think it will work on later versions. I haven't tried it yet with those versions.
    Any external drive can be plugged into the mac. Use the one with the fastest connection or cheapest price according to your budget. USB2 drives are cheap and plentiful. But no where near as fast as USB3 or FW800. So just pick whichever suits the ports on your Mac. Interesting Apple finally moved to USB3 on their latest computers.
    TM should exclude the VM partition file.. it is useless backing it up from Mac OS side.. and will slow TM as it needs to backup that partition everyday for no purpose.. TM cannot see the files inside it to backup just the changes.
    You need to backup windows from windows. Use MSbackup to external drive.. if you have pro or ultimate versions you can backup to network drive. But MSbackup is a dog.. at least until the latest version it cannot restore the partition without first loading windows. There are about a zillion backup software versions for windows.. look up reviews and buy one which works for you. I use a free one Macrium Reflect which does full disk backups and is easy to restore.. to do incremental backups though you have to pay for it.

  • Need suggestion on how to do 3D spinning title animation

    Hello all experts,
    I need suggestion on how to do 3D rotating title animation. Let me explain what i wanted to do.
    The end product is the word WELCOME.
    But I want to animate it in such a way that the alphabelt W first appear as nothing from inside the screen to appear in the screen (that means zoom from small to big, is it called zoom out ?). In the process of zooming out, I want the W to have a thickness & it spins very fast along the horizontal X-axis and stops at the screen with the alphbelt W.
    Then the whole process repeat with E, and I have WE. It then repeats with L and I have WEL. This whole thing repeats until it forms the word WELCOME.
    Any suggestions ? Is there an inbuilt preset for this ?
    If not, if I do from scratch, do I need a separate track for each alphabelt ?
    Thank you very much.
    Cheers.

    Nick Holmes wrote:
    You would have to build this one from scratch, but it's pretty easy.
    Work on the whole word first to get the basic movement, then play with the Timing settings in the Inspector. To have the letters do this one after the other use the Sequence setting. Typically you would set it to the number of letters in your word plus 1 -so your welcome should have a Sequence value of 8. You can of course set it to whatever you think looks best.
    Give it a go and let us know how you get on. Don't forget to save your new effect!
    Thanks Holmes but where do I find the Sequence settings ?
    Thanks

  • Need suggestion in getting data using JDBC

    Hi all need suggestion,
         i had a VO corresponding to database table.
         when i am try to get the records from that table,
         how can i initialize the particular column value to the
         corresponding VO setter method.
         please do the needful.

    Hello inform2csr,
    Your question is not so clear.
    Can you be more precise?
    What is VO?

  • Need suggestion for designing a BEx report

    Hi,
    I need suggestions for designing a BEx report.
    Iu2019ve a DSO with below structure:
    1. Functional Location u2013 Key
    2. Maintenance Plan u2013 Key
    3. Maintenance Item u2013 Key
    4. Call # - Key
    5. Cycle u2013 Data Field
    6. Planned Date u2013 Data Field
    7. Completion Date u2013 Data Field
    This DSO contains data like:
    Functional -
    Plan --- Item -
    Call# --- Cycle -
    Planned Dt -
    Completion Dt
    Location
    11177 -
         134 -
         20 -
         1 -
    T1 -
         02-Jan-2011 -
         10-Jan-2011
    11177 -
         134 -
         20 -
         2 -
    T2 -
         15-Feb-2011 -
    11177 -
         134 -
         20 -
         3 -
    T1 -
         15-Mar-2011 -
    11177 -
         134 -
         20 -
         4 -
    M1 -
         30-Mar-2011 -
    25000 -
         170 -
         145 -
         1 -
    T1 -
         19-Jan-2011 -
         19-Jan-2011
    25000 -
         134 -
         145 -
         2 -
    T2 -
         20-Feb-2011 -
         25-Feb-2011
    25000 -
         134 -
         145 -
         3 -
    T1 -
         14-Mar-2011 -
    Now Iu2019ve to create a report which will be executed at the end of every month and should display the list of Functional Locations whose Cycles were planned in that particular month, along with the last completed Cycle/Date.
    Thus based upon above data, if I execute report at the end of (say) March then report must display:
    Functional ---     Curr. Cycle --- Planned Date --- Prev. completed Cycle --- Prev Completed Date
    Location
    11177 -
         T1 -
         15-Mar-2011 -
    ---     T1 -
    --     10-Jan-2011
    11177 -
         M1 -
         30-Mar-2011 -
    ---     T1 -
    --     10-Jan-2011
    25000 -
         T1 -
         14-Mar-2011 -
    ---     T2 -
    --     25-Feb-2011
    Any idea how can I display Previous Completed Cycle and Completion Date (i.e. the last two columns)?
    Regards,
    Vikrant.

    hi vikrant,
    You can a Cube at the reporting layer  which gets data from DSO and which has these 2 extra characteristics completion date and previous cycle along with other chars and keyfigures from DSO.
    You can populate these  based on your logic in the field routine.
    Hope it helps.
    Regards
    Dev

  • Need Suggestion about Solman support & testing E CATT feature

    Hi Solman Experts .
    I need your Strong suggestion. Actually i am working in  ABAP module , I recently joined as a fresher in small company,  I got opportunity to  go Saudi for  "Solman support & testing ,E CATT"  in big MNC . Now i need suggestion , If i go and work there in these areas , If i return to India  will i get Good Job  and Salary here .
    Please suggest me. please it my career issue.

    hi Gafoor,
    I too had this kind of oppurtunity and now i am in abhudabi in crm and solman testing. No problem in this , So you can go to saudi as your wish and the future and scope for the solman is very good. So it s reasonable to go saudi .
    Regards,
    Prabhushankar

  • Need Suggestion​: buy ThinkPad Edge E540 or wait for Edge E550?

    Hello Everyone,
    I need suggestion what to do: buy ThinkPad Edge E54020C6003AGE (i7 4702MQ & GF 740M 2GB) or wait for Edge E550?
    http://www.notebookcheck.net/Review-Lenovo-ThinkPa​d-Edge-E540-20C6003AGE-Notebook.114194.0.html in Germany is price about 830 Euros
    I use ThinkPads in last 10 years for study and gaming (R60, SL510, Edge 520) and wish sell my Edge E520 replace it with new one due stuck with old Radeon 6630M drivers (I cannot use a new AMD drivers when I try I getting mostly BOSD errors and latest Official Lenovo driver is from 2012) second reason is that E520 fan cannot be accessed & cleaned on easy way.
    In which month Lenovo mostly release new Edges, What is your option are Broadwell CPU + GeForce 840/940M in Edges worth to wait?
    In future I try to avoid AMD GPU due poor drivers support.
    I know that there is much better notebooks for gaming but I like ThinkPads

    To support it the model you're buying should be equiped with the :
    Intel® Dual Band Wireless-N 7260
    Intel® Dual Band Wireless-AC 7260 
    Wireless network adapters and core i5/i7 cpu's . But careful, not all E540s come with the intel wireless card
    Just check this and you're good to go.

  • Need suggestion-abap+bi

    Dear gurus,
    I need suggestion before learning new module. I did ABAP and having good experience. Now I want to update my skill please suggest me wat I should learn. I want to upgrade my skill only in technical side. Few of them suggested me BI but dont know how good it will be in US market.
    Any help will be appreciated.
    Regards
    Dave

    Hi Aasim,
    Even the carrer growth in ABAP is very Good.
    IN BW project, there is requirement of ABAPer. So if you are BW+ABAP, you will be getting paid more. Your value would be more.
    Now, making a shift, even you want to change from ABAP to BW, you need to take some training. Because BW abap is a bit different thatn general ABAP.
    The DW experience is not needed very much.but yes, its better to have knowledge in DW.
    I'll suggest you to work for 6 months in ABAP and then take a training in BW. Because its more BW than ABAP in BW.
    Hope you would have got some idea.
    Please revert for any other questions.
    Thanks..
    Shambhu

  • Need suggestion

    hi....i need suggestion on my problem.i've been given a complete atand-alone java application.my assignment is to make the system,a web-based system so that when we want to make a demo we did not need to bring an installer.just show to from the browser.i thought of using java web start.it's just my opinion.so,i want to hear others opinion......
    Tq

    Java Web Start is the solution I would choose. You must bear in mind that a browser is not enough to run Java Web Start - the client PC must have the correct version of the run-time environment (JRE) installed as a minimum - which, I think, is somewhere about a 10-15 megabyte installation.
    The run-time environment for end-users is best/readily installed from the http://www.java.com site. Click the "get it now" button and away you go!
    Alternatively, I think some PCs actually recognise when you've clicked on a JNLP link and automatically check your to see if you have a version of the JRE and download it if necessary - but I'm not 100% sure if this can be relied upon across all platforms/browsers...
    I think you can also program your JNLP file as to where to look for the JRE installer (ie: maybe on your LAN instead of www.java.com), but I haven't researched that one yet.

  • Need suggestion on Multi currency and Unicode character set use in ABAP

    Hi All,
    Need suggestion. In one of the requirement I saw 'multi-currency and Unicode character set experience in FICO'.
    Can you please elaborate me how ABAPers are invlolved in multi currency as I think this is FICO fuctional area.
    And also what is Unicode character set exp.? Please give me some document of you have any.
    Thanks
    Sreedevi
    Moderator message - This isn't the place to prepare for interviews - thread locked
    Edited by: Rob Burbank on Sep 17, 2009 4:45 PM

    Use the default parser.
    By default, WebLogic Server is configured to use the default parser and transformer to parse and transform XML documents. The default parser and transformer are those included in the JDK 5.0.
    The built-in WebLogic Server DOM factory implementation class is com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.
    The DocumentBuilderFactory.newInstance method returns the built-in parser.
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

  • Need suggestion whether to use ATM or MPLS in DSL implementation

    Presently i am working in ISP, and we are providing internet access via simple dialup, ISDN and IVS. and now we want to implement DSL i ve talk with few peoples regarding whether to use ATM or MPLS in DSL implementation but because they are solution providers so i think they are giving me expensive solution. as long as i know about this is,whole world is shifting from ATM to MPLS Technology. ATM implementation cost is very high. so i need suggestion from u because you also have practical exposure.

    I believe ATM is soon getting obsolete...

  • Need suggestion for new laptop

    Hi, everyone I'm needing suggestions. I had a touchsmart tx2z however after nearly 4 years it has bit the dust couldn't be saved after its last crash computer would turn on but screen would stay black and ome of the keys like the caps lock would flash. Computer guys say my motherboard has gone bad.  I'm looking for another computer now but would like one that is similar to the hp touchsmart but does not cost a lot of money.  

    Here is the current line-up of HP Touchscreen Laptops. Prices start at about $650 and go up from there. $650 sounds OK to my for a touchscreen laptop, but price is a subjective item. If these are too rich for you, you could always look at regular laptops.
    Please send KUDOs
    Frank
    {------------ Please click the "White Kudos" Thumbs Up to say THANKS for helping.
    Please click the "Accept As Solution" on my post, if my assistance has solved your issue. ------------V
    This is a user supported forum. I am a volunteer and I don't work for HP.
    HP 15t-j100 (on loan from HP)
    HP 13 Split x2 (on loan from HP)
    HP Slate8 Pro (on loan from HP)
    HP a1632x - Windows 7, 4GB RAM, AMD Radeon HD 6450
    HP p6130y - Windows 7, 8GB RAM, AMD Radeon HD 6450
    HP p6320y - Windows 7, 8GB RAM, NVIDIA GT 240
    HP p7-1026 - Windows 7, 6GB RAM, AMD Radeon HD 6450
    HP p6787c - Windows 7, 8GB RAM, NVIDIA GT 240

  • Need suggestion for choosing Java development enviroment

    Hi Evereyone,
    I am new to Java Desktop Application.I need help on choosing proper Java technologies and development tool.
    We have an existing CLIENT/SERVER based distributed control system, which was developed in C++(Server side) and VB(Client GUI).Now we are think of migrating the system to Java platform.
    Here is the outline:
    We want to create web based application that will run on windows and linux (linux on embedded PC).
    The application should be able to support 10 � 100 users at once accessing/editing database.
    We will also need to create a communication server that will run on web server P.C. that will communicate tcpip to field panels/log to db, as well as allow web screens to send/receive commands with field panels etc.
    Could any one give me some suggestion about it?
    I am thinking of Using J2SE 5.0, including RMI, JDBC and Swing for GUI. As for field panels, may choose J2ME.
    Thank you very much in advance.

    Thanks, zadok .
    Actually, I don't have the system requirements neither. All I know is the following outline:
    "We want to create web based application that will run on windows and linux (linux on embedded PC).
    The application should be able to support 10 � 100 users at once accessing/editing database.
    We will also need to create a communication server that will run on web server P.C. that will communicate tcpip to field panels/log to db, as well as allow web screens to send/receive commands with field panels etc."
    It is a interview question, which need me to do research and give some suggestions. What I want to know is to figure out what kind of Java technology is necessary for developing this system because I want to make sure I head to right direction.
    I know somehow it is hard to give suggestion based on this limited information.
    One more thing I was confusing is the server-side architecture.
    I need suggestion about sever side architecture:
    a. write a dedicated server-side program, which act
    as communication server to monitor and control field
    panel, also act as server-side applicaiton by using
    RMI to communicate with Client-side communication.
    b. choose a general web server architecture. Put
    everything in server side in Web Server, for example
    Tomcat AS container, implementing the Communication
    server as Web Service and the request from
    Client-side go to Web Server first, then dispatch to
    a proper web service.Why did you not include this information in the original question!
    Why don't you just use Tomcat?
    For your answer, "Why don't you just use Tomcat?", does it mean Tomcat without Web Service will be enough for this system development? Could you give me some detail about it?
    Thank you very much, zadok.

Maybe you are looking for

  • ITunes and XP see new iPod(s) but perptually detect recovery mode

    Hello. We received two 80GB iPod Classics and a 160GB iPod Classic for Christmas. Had to install XP SP2 and iTunes 7.5.0.20 in order to load music. The iPods are detected by XP: the "Safely Remove Hardware" icon shows up in the TaskBar, and "Apple iP

  • Insufficient bandwidth

    I'm trying to set up an iChat video chat with my dad. We both have an brandnew iMac with iSight build in. Both have an ADSL with more then 250kps upload (should be enough for ichat videoconferencing, isn't it?) And still we get the warning insufficie

  • WHere is Org unit stored from standard selection screen

    I am using a report category HRBEN0004. I fill up org unit, but PNPORGEH is blank in my report. Where does this Org unit get stored if I want to do something in the report based on selected org unit? Thanks in adv.

  • How do I apply one same transition to multiple slides in one go?

    How do I apply one same transition to multiple slides in one go?

  • URGENT - Multi-form problem

    Would be great if anyone could help me with this: Say I have two forms A and B, A has a repeating timer which, when fires, will GO_FORM to B and B's WHEN-WINDOW- ACTIVATED should fire and do stuff. Problem is if the focus is already on form B at the