Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-308

WildcardPermission constructor needs to throw IllegalArgumentException for "" part

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      All operating systems

      Description

      WildcardPermission currently allows "" part in a permission.
      This has no real use and can lead to user /programmer errors.

      For example:

      If instead of File:*:myfile, I accidently create File::myfile

      all permission checks will fail as

      File::myfile does not imply say File:read:myfile.

      Since File::myfile has no meaning, this permission is not securing anything.

      File::myfile is broken into the parts "File","","myfile".

      Since "" part is unlikely to have any useful meaning, it might be better to throw an IllegalArugmentException if a
      permission has a "" part and prevent user/programmer errors.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mj Manoj Khangaonkar
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: