Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize code to authorize page access via role, Page, & URI. #78

Closed
3 tasks done
NathanGibbs3 opened this issue Oct 12, 2020 · 0 comments
Closed
3 tasks done
Assignees
Labels
enhancement New feature or request invalid This doesn't seem right LCB-TechDebt Issue exists in Legacy Code Base. We inherited it. Prod Observed in Production Environment. Security Issue impacts or is related to App Security.
Milestone

Comments

@NathanGibbs3
Copy link
Owner

NathanGibbs3 commented Oct 12, 2020

Item Description
File: includes/base_auth.inc.php
Class: N/A
Function: AuthorizedRole(), AuthorizedPage(), AuthorizedURI()
Similar Issues: #37
Depends on Issue(s):
Dependency Type:
Misc. Info.:

Expected Behavior:
App does this via standard functions that we can Unit Test.

  • AuthorizedRole()
  • AuthorizedPage()
  • AuthorizedURI()
    Current Behavior:
    App does this in various ways in the code.
@NathanGibbs3 NathanGibbs3 added invalid This doesn't seem right Prod Observed in Production Environment. LCB-TechDebt Issue exists in Legacy Code Base. We inherited it. Security Issue impacts or is related to App Security. labels Oct 12, 2020
@NathanGibbs3 NathanGibbs3 added this to the 1.4.6 milestone Oct 12, 2020
@NathanGibbs3 NathanGibbs3 self-assigned this Oct 12, 2020
@NathanGibbs3 NathanGibbs3 changed the title Standardize code to authorize page access vie role, via URI, & page. Standardize code to authorize page access vie role, Page, & URI. Oct 12, 2020
@NathanGibbs3 NathanGibbs3 changed the title Standardize code to authorize page access vie role, Page, & URI. Standardize code to authorize page access via role, Page, & URI. Oct 12, 2020
NathanGibbs3 added a commit that referenced this issue Oct 15, 2020
         Partial fix for #78

        File(s): Multiple.
                 Replaced Role based Authorization checks
                 with call to AuthorizedRole()
                 Misc code cleanup.

        File(s): includes/base_auth.inc.php
    Function(s): function AuthorizedRole( $role, $header )
                 Returns true if the role of current user
                 is authorized. Issues HTTP redirect if
                 valid header is given.
   Unit Test(s): Covers AuthorizedRole()
NathanGibbs3 added a commit that referenced this issue Oct 16, 2020
        File(s): Multiple.
                 Replaced Page based logic checks with call to
                 AuthorizedPage()
                 Misc code cleanup.

        File(s): includes/base_auth.inc.php
    Function(s): function AuthorizedPage( $page )
                 Returns true if the passed value is part of the
                 running script anme.

   Unit Test(s): Covers AuthorizedPage() && readRoleCookie()
@NathanGibbs3 NathanGibbs3 added the enhancement New feature or request label Oct 16, 2020
Code Quality - Implementation Standardization & Maintainability automation moved this from High priority to Closed Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request invalid This doesn't seem right LCB-TechDebt Issue exists in Legacy Code Base. We inherited it. Prod Observed in Production Environment. Security Issue impacts or is related to App Security.
Development

No branches or pull requests

1 participant