Results 1 to 2 of 2

Thread: design security, does spring security can be used?

  1. #1
    Join Date
    Apr 2008
    Location
    spain
    Posts
    21

    Question design security, does spring security can be used?

    hi

    i try to design the security of an application. It's a project management software.

    An user can be assigner on many project.
    An user can have many role.
    an role can have many permission.

    An user can have different role in function of a project.
    An role can have different permission in function of a project.

    An schema i thought

    Code:
        create table project (  
            id       int            GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1) not null,  
            name varchar(50) not null,  
            primary key(id)  
        ) ;  
          
        create table account (  
            id       int            GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1) not null,  
            username varchar(50) not null,  
          primary key(id)  
        ) ;  
          
        create table role (  
            id       int            GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1) not null,  
            name varchar(50) not null,  
            primary key(id)  
        ) ;  
          
        create table permission (  
            id       int            GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1) not null,  
            name varchar(50) not null,  
            primary key(id)  
        ) ;  
          
        create table permissionscheme (  
            id       int            GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1) not null,  
            name varchar(50) not null,  
            primary key(id)  
        ) ;  
          
        create table schemepermissions (  
            id       int            GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1) not null,  
            permissionscheme_id int  not null,  
            permission_id int  not null,  
            role_id int  not null,  
            foreign key (permissionscheme_id) references permissionscheme (id),  
            foreign key (permission_id) references permission (id),  
            foreign key (role_id) references role (id),  
            primary key(id)  
        ) ;  
          
        create table account_role_project (  
            id       int            GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1) not null,  
            project_id int  not null,  
            account_id int  not null,  
            role_id int  not null,  
            foreign key (project_id) references project (id),  
            foreign key (account_id) references account (id),  
            foreign key (role_id) references role (id),  
            primary key(id)  
        ) ;


    idea comment, tip...?

    does spring security can be used for that?

    thanks

  2. #2
    Join Date
    Jan 2008
    Posts
    1,826

    Default

    Take a look at the contacts sample application
    Rob Winch - @rob_winch
    Spring Security Lead
    Pivotal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •