Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-18864

CIDR permission cache probably does not work

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Duplicate
    • None
    • None
    • None
    • Correctness - Consistency
    • Normal
    • Low Hanging Fruit
    • Code Inspection
    • All
    • None

    Description

      CIDR permission cache code:

          /**
           * Invalidate a role from CIDR permissions cache
           * @param roleName role for which to invalidate the cache
           * @return boolean returns true if given role found in the cache and invalidated, otherwise returns false
           */
          public boolean invalidateCidrPermissions(String roleName)
          {
              if (cache.getIfPresent(roleName) == null)
                  return false;
      
              invalidate(RoleResource.role(roleName));
              return true;
          }
      

      passes String role name to the cache and if it returns null it just returns false. It will always return null because cache expects objects of type RoleResource.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned Assign to me
            jlewandowski Jacek Lewandowski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment