Saturday, May 1, 2021

Role-Based Access Control using Values-based Functional Permissions

We may need a complex type of permissions which is very hard to define and implement in our applications. For cases like this, the value-based functional permissions using RBAC may solve the problem. I came up with the value-based idea to solve the complex fine-grained access requirement. The permisions will have additional fiels: suffix and value_type_id. Some examples of such permissions are as follows [Format: permission [suffix] [value_type] [values]]:

  • View_Invoice_Access
  • Region_Level_Access
  • Multiple_Department_Access DepartmentGroup1 <Department> 1,2,3
  • Multiple_Department_Access DepartmentGroup2 <Department> 4,5,6
  • Create_Invoice
  • Cancel_Invoice

Roles in Dot Notation

I think role names should be written in dot notation for better clarity and easy maintenance as follows:

  • Sales.Central
  • Accounts.Central
  • Sales.Region.Asia
  • Sales.Region.All

Reference

Functional and RBAC learned from https://www.visual-guard.com/EN/net-powerbuilder-application-security-authentication-permission-access-control-rbac-articles/dotnet-security-article-ressources/iam-best-practices.php

Tuesday, April 30, 2019

The Future of Space Travel

Soon living on other planets will either be necessity or luxury or a freedom. But, for that to happen we need technology to travel through the space very fast. As far as I know, at present there are rocket propulsion technology to travel to mars but it takes a lot of fuel. Some months ago an idea popped in my mind about a way to travel through the space in speed of light.

The main principle of this technology is that Electromagnetic Wave (EM) can travel through the space. But, we already know that motion is relative so there must be something relative to which the EM travels. So, it could be possible that we make such a source of EM that makes the EM stationary but it - itself moves relative to the space (or may be with time also). Following is the visualization of this idea:


Thursday, September 15, 2016

Skin Healing

When skin is injured or lost, regrown skin has different appearance than original skin. I think it is possible to re-grow skin same as before injury because once I have seen a case where a small circular portion of skin was lost and I observed skin grown from one portion of circumference of the hole about to fill the hole (it looked like a lid) but could not join with remaining circumference due to dead skin cells in those areas. This grown skin looked same as original skin before loosing. Due to dead skin cells at the boundary, it was lost and skin with different look grew and sealed the hole.

I think the solution is to use a special material which does not react with any part of body, is very plastic and also like rubber to cover the flesh temporarily to protect the wound and remove the dead skin cells from all the boundaries. The wound must be properly cleaned and also surrounding area of the wound and then bandage will be required to keep in place the protective material and protect the wound from further damage. Then the skin cells may regrow same as the original to cover the injury.

Tuesday, April 12, 2016

A thought about designing database tables

I think database tables can be designed just by studying the information that will be needed to be retrieved from the database. There may be exceptional cases where this technique will not work.

Example 1: Imaginary small Store Database

Products in store, product detail, sales record, profit.

products(pid, name,quantity, unit: carton, box, individual, package, packet,bottle),total units)

product_detail1(pid,price,discount)

product_detail2(pid,property,value,unit) [property could be weight, power, current, volume, concectration, size, etc.]

sales(sid,date,time,pid,quantity,mp,sp)

profit(sid,profit)

Example 2: A Database for Imaginary Library

List of all the books, book detail, book usage history, book status,  list of users, library cards, card detail, user detail, fines, total fines, late returns, books lost record, books recovered record, books stolen, etc.

library_books(lbid,bid)

books(bid,title,authors_id,ISBN,Edition)

authors(authors_id,name,order)
[one row for each author]

book_detail(bid,publisher,date,price)

book_usage(usage_id,lbid,userid,date,time,action:(taken,returned,late return,lost,damaged,recovered))

book_status(lbid,status:(good,damaged,old,lost,stolen)

users(userid,name)

cards(userid,cardid)

card_detail(cardid, created_date,expiry_date)

user_detail(userid,address1,address2,phone_number,email,total_pending_fines)

fines(usage_id,fine_amount)

{Total fines can be evaluated from user_detail}

{Remaining informations can be retrieved from book_usage table}

Optional tables:
late_return(lbid,userid,date,time,delay)
books_lost(lbid,userid,date,time)
and so on...