Changeset 24423 in main


Ignore:
Timestamp:
01/06/22 20:55:28 (11 months ago)
Author:
GarthBraithwaite_STG
Message:

admin, java - changed ValueType? JAVA_FORMAT_PATTERN to JAVASCRIPT_FORMAT_PATTERN. input css padding. Spring security voters be unanimous. Cleaned out securityPreAuthenticationHeaderStufferFilter. Removed redundant securityAuthorizationAuthenticatedVoter. Added provision for non admin, non specific ip list request to allow for access granted.

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/db/src/main/scripts/mysql/update_tabs.sql

    r20835 r24423  
    3131
    3232alter table VALUE_TYPE change column XSLT_FORMAT_PATTERN XSLT_FORMAT_PATTERN varchar(50);
    33 alter table VALUE_TYPE change column JAVA_FORMAT_PATTERN JAVA_FORMAT_PATTERN varchar(50);
     33alter table VALUE_TYPE change column JAVA_FORMAT_PATTERN JAVASCRIPT_FORMAT_PATTERN varchar(50);
    3434alter table VALUE_TYPE  add column REGEX_VALIDATION_PATTERN varchar(100);
    3535alter table VALUE_TYPE  add column ACTIVE_FLAG   varchar(1);
  • trunk/ibisph-admin/src/main/webapp/WEB-INF/config/spring/security.xml

    r21694 r24423  
    9494                <constructor-arg>
    9595                        <list>
    96 <ref bean="securityPreAuthenticationHeaderStufferFilter"/>
    9796                                <ref bean="securitySecurityContextPersistenceFilter"/>
    9897                                <ref bean="securityLogoutFilter"/>
     
    106105                <constructor-arg>
    107106                        <list>
    108 <ref bean="securityPreAuthenticationHeaderStufferFilter"/>
    109107                                <ref bean="securitySecurityContextPersistenceFilter"/>
    110108                                <ref bean="securityLogoutFilter"/>
     
    118116                <constructor-arg>
    119117                        <list>
    120 <ref bean="securityPreAuthenticationHeaderStufferFilter"/>
    121118                                <ref bean="securitySecurityContextPersistenceFilter"/>
    122119                                <ref bean="securityLogoutFilter"/>
     
    163160                                <property name="errorPage" value="/WEB-INF/jsp/access_denied.jsp?message=Security Exception"/>
    164161                        </bean>
    165                 </property>
    166         </bean>
    167 
    168         <bean id="securityPreAuthenticationHeaderStufferFilter" class="org.ibisph.web.filter.add.AddRequestHeadersFilter">
    169                 <description>
    170                         This is a filter that can be used for testing preauth or in the case
    171                         of no auth can provide admin privs for the app to be ran locally
    172                         without needing to setup a db user and privs.  For testing simply
    173                         import the no auth xml config and modify test entries as desired.
    174 
    175                         IMPORTANT NOTE: for PRODUCTION, this map should NEVER be populated.
    176                 </description>
    177                 <property name="requestHeadersMap">
    178                         <map>
    179                         <!--  Test Entries
    180                                 <entry key="admin"    value="#{securityAuthorityAdmin.string}"/>
    181                                 <entry key="fullname" value="All Mighty"/>
    182                                 <entry key="email"    value="administrator@ibisph.org"/>
    183 
    184                                 <entry key="fullname" value="Brian Paoli"/>
    185                                 <entry key="email"    value="bpaoli@utah.gov"/>
    186                                 <entry key="admin"    value="NotAnAdmin"/>
    187 
    188                                 <entry key="fullname" value="Jessica Wratha"/>
    189                                 <entry key="email"    value="JWRATHA@utah.gov"/>
    190                         -->
    191                         </map>
    192162                </property>
    193163        </bean>
     
    434404        </bean>
    435405
    436         <bean id="securityAuthorizationAuthenticatedVoter"  class="org.springframework.security.access.vote.AuthenticatedVoter"/>
    437 
    438406        <bean id="securityAuthorizationRoleVoter" class="org.springframework.security.access.vote.RoleVoter">
    439407                <property name="rolePrefix" value=""/>
     
    468436                ConsensusBased == majority must vote to allow.
    469437        -->
    470         <bean id="securityAuthorizationAccessDecisionManager" class="org.springframework.security.access.vote.AffirmativeBased">
    471                 <constructor-arg>
    472                         <list>
    473                                 <ref bean="securityAuthorizationAuthenticatedVoter"/>
     438        <bean id="securityAuthorizationAccessDecisionManager" class="org.springframework.security.access.vote.UnanimousBased">
     439                <constructor-arg>
     440                        <list>
     441                                <ref bean="securityAuthenticatedVoter"/>
    474442                                <ref bean="securityAuthorizationRoleVoter"/>
    475443                        </list>
     
    477445                <property name="allowIfAllAbstainDecisions" value="false"/>
    478446        </bean>
    479         <bean id="securityAuthorizationIndicatorAccessDecisionManager" class="org.springframework.security.access.vote.AffirmativeBased">
     447        <bean id="securityAuthorizationIndicatorAccessDecisionManager" class="org.springframework.security.access.vote.UnanimousBased">
    480448                <constructor-arg>
    481449                        <list>
    482450                                <ref bean="securityAuthenticatedVoter"/>
    483                                 <ref bean="securityAuthorizationAuthenticatedVoter"/>
    484451                                <ref bean="securityAuthorizationIndicatorVoter"/>
    485452                        </list>
     
    487454                <property name="allowIfAllAbstainDecisions" value="false"/>
    488455        </bean>
    489         <bean id="securityAuthorizationSaveIndicatorAccessDecisionManager" class="org.springframework.security.access.vote.AffirmativeBased">
     456        <bean id="securityAuthorizationSaveIndicatorAccessDecisionManager" class="org.springframework.security.access.vote.UnanimousBased">
    490457                <constructor-arg>
    491458                        <list>
    492459                                <ref bean="securityAuthenticatedVoter"/>
    493                                 <ref bean="securityAuthorizationAuthenticatedVoter"/>
    494460                                <ref bean="securityAuthorizationSaveIndicatorVoter"/>
    495461                        </list>
     
    497463                <property name="allowIfAllAbstainDecisions" value="false"/>
    498464        </bean>
    499 
    500 
    501465
    502466
     
    540504        </bean>
    541505
     506
    542507        <!-- ========================================= A C C E S S   F I L T E R S -->
    543508        <bean id="securityAuthorizationIndicatorInterceptorFilter"     class="org.springframework.security.web.access.intercept.FilterSecurityInterceptor">
  • trunk/ibisph-admin/src/main/webapp/WEB-INF/config/spring/value_type.xml

    r16437 r24423  
    6565                                <entry key="description"       value="DESCRIPTION"/>
    6666                                <entry key="xsltFormatPattern" value="XSLT_FORMAT_PATTERN"/>
    67                                 <entry key="javaFormatPattern" value="JAVA_FORMAT_PATTERN"/>
    68                                 <entry key="regExValidationPattern" value="REGEX_VALIDATION_PATTERN"/>
     67                                <entry key="javascriptFormatPattern" value="JAVASCRIPT_FORMAT_PATTERN"/>
     68                                <entry key="regExValidationPattern"  value="REGEX_VALIDATION_PATTERN"/>
    6969                                <entry key="rankingFlag"       value="RANKING_FLAG"/>
    7070                                <entry key="sortOrder"         value="SORT_ORDER"/>
  • trunk/ibisph-admin/src/main/webapp/WEB-INF/jsp/_footer.jsp

    r21944 r24423  
    11<footer id="footer">
    22        <a href="http://ibisph.org">IBIS-PH Community</a>
    3         <div id="releaseDate">Release Date: Sept-27-2020</div>
     3        <div id="releaseDate">Version 3.0.0, Release Date: Jan-16-2022</div>
    44</footer>
    55
  • trunk/ibisph-admin/src/main/webapp/WEB-INF/jsp/login/detail.jsp

    r21944 r24423  
    3838
    3939        <jsp:body>
     40                <p>
    4041                The Indicator Based Information System's Data Administration and
    4142                Maintenance Application allows health offices to create, maintain,
     
    4445                to enter this site.  If you do not know your username and password
    4546                contact your IBIS-PH Director.
    46                 <br/><br/>
     47                </p><br/>
    4748
    4849<c:if test="${!empty SPRING_SECURITY_LAST_EXCEPTION.message}">
     
    7071                                </td>
    7172                        </tr>
     73                        <tr><td></td></tr>
    7274                        <tr>
    7375                                <td>Password</td>
  • trunk/ibisph-admin/src/main/webapp/WEB-INF/jsp/value_type/_help.jsp

    r16500 r24423  
    114114</c:set>
    115115
    116 <c:set var="javaFormatPatternHelp">
    117         This is used when backend processing needs to format a value.  In the past
    118         this was needed for the Agileblox charts.  In future this will be used for
    119         any backend processing like creating any consumable data.  As of 6/20/2018
    120         this value is not needed.  The field exists and should be left in place
    121         until deemed not needed.
     116<c:set var="javascriptFormatPatternHelp">
     117        This is used for front end javascript value formatting when the xslt formatted
     118        value is not possible.  This use case is typically used for values that are
     119        calculated by script like the kendo chart axis values or choropleth map
     120        legend ranges.
     121        <br/><br/>
    122122       
    123         XSLT and Java format pattern *MAY* be the same but do differ.  As such a
    124         distinction is needed.
     123        Note for patterns that include an apos or other special string characters
     124        those chars will need to be escaped or specified as an embedded special
     125        character i.e. for the apos: \'.  This will be the case for all javascript
     126        type format patterns.
     127        <br/><br/>
     128
     129        In the past this field was named JAVA_FORMAT_PATTERN which was used by the
     130        java code to format Agileblox chart values.  The javascript format pattern
     131        is typically a Kendo.toString pattern.  This field is named more generic
     132        (i.e. not named "kendo format pattern") so that other javascript libs could
     133        be implemented. 
    125134</c:set>
    126135
  • trunk/ibisph-admin/src/main/webapp/WEB-INF/jsp/value_type/detail.jsp

    r16437 r24423  
    2929                        <tag:detailTableRowTextArea label="Description" name="description" maxlength="500" rows="5" text="${valueType.description}" help="${descriptionHelp}"/>
    3030                        <tag:detailTableRowSeperator/>
     31                        <tag:detailTableRowTextArea label="RegEx Validation Pattern" name="regExValidationPattern" maxlength="100" rows="3" text="${valueType.regExValidationPattern}" help="${regExValidationPatternHelp}"/>
     32                        <tag:detailTableRowSeperator/>
    3133                        <tag:detailTableRowInput    label="XSLT Format Pattern" name="xsltFormatPattern" maxlength="50" value="${valueType.XSLTFormatPattern}" help="${xsltFormatPatternHelp}"/>
    32                         <tag:detailTableRowInput    label="Java Format Pattern" name="javaFormatPattern" maxlength="50" value="${valueType.javaFormatPattern}" help="${javaFormatPatternHelp}"/>
    33                         <tag:detailTableRowTextArea label="RegEx Validation Pattern" name="regExValidationPattern" maxlength="100" rows="3" text="${valueType.regExValidationPattern}" help="${regExValidationPatternHelp}"/>
     34                        <tag:detailTableRowInput    label="Javascript Format Pattern" name="javascriptFormatPattern" maxlength="50" value="${valueType.javascriptFormatPattern}" help="${javascriptFormatPatternHelp}"/>
    3435                        <tag:detailTableRowSeperator/>
    3536                        <tag:detailTableRowInput    label="Sort Order"  name="sortOrder"   maxlength="10" value="${valueType.sortOrder}" type="number" cssClass="SortOrder" help="${sortOrderHelp}"/>
  • trunk/ibisph-admin/src/main/webapp/css/_general.css

    r21373 r24423  
    3535}
    3636
     37p
     38{
     39        margin:                         0.5em 0;
     40        line-height:            1.4em;
     41        max-width:                      55em;
     42}
    3743
    3844a   /*--- Must be in this order: A, link, visited, hover, active ---*/
     
    9096        border:                         solid 1px #777;
    9197        border-radius:          4px;
    92         box-shadow:                             inset 1px 1px 2px #bbb;
     98        box-shadow:                     inset 1px 1px 2px #bbb;
    9399/*
    94100        background : #d0d5e0;
     
    115121
    116122
    117 input {padding: 1px 2px 1px 2px;}
     123input, textarea
     124{
     125                padding: 4px 2px 3px 4px;
     126}
    118127
    119128*[disabled='true'], *[disabled='disabled'], *[disabled],
     
    130139textarea
    131140{
    132         padding:                        4px 2px 3px 5px;
    133141        overflow:                       auto;
    134142}
  • trunk/ibisph-admin/src/main/webapp/css/_table.css

    r21944 r24423  
    256256{
    257257        display:                        inline-block;
    258         width:                          calc(100% - 40px);
     258        width:                          calc(100% - 50px);
    259259}
    260260table.Detail input[type="number"],
  • trunk/ibisph/src/main/java/org/ibisph/indicatorprofile/databean/ValueType.java

    r16437 r24423  
    2020    addField("DESCRIPTION",         Field.TYPE_STRING);
    2121    addField("XSLT_FORMAT_PATTERN", Field.TYPE_STRING);
    22     addField("JAVA_FORMAT_PATTERN", Field.TYPE_STRING);
     22    addField("JAVASCRIPT_FORMAT_PATTERN", Field.TYPE_STRING);
    2323    addField("REGEX_VALIDATION_PATTERN", Field.TYPE_STRING);
    2424    addField("SORT_ORDER",          Field.TYPE_BIGDECIMAL);
     
    4141    return( getStringFieldValue("XSLT_FORMAT_PATTERN") );
    4242  }
    43   public String getJavaFormatPattern() {
    44     return( getStringFieldValue("JAVA_FORMAT_PATTERN") );
     43  public String getJavascriptFormatPattern() {
     44    return( getStringFieldValue("JAVASCRIPT_FORMAT_PATTERN") );
    4545  }
    4646  public String getRegExValidationPattern() {
  • trunk/ibisph/src/main/java/org/ibisph/indicatorprofile/springsecurity/IndicatorAccessVoter.java

    r11123 r24423  
    7575      result = ACCESS_GRANTED;
    7676    }
     77/*
    7778    else if(!org.ibisph.util.StrLib.isSomething(requestedName)) {
    7879      result = ACCESS_ABSTAIN;
    7980    }
     81*/
    8082    else if(allowedIndicatorsUserDetails.getAllowedIndicatorNameSet().contains(requestedName)) {
     83      result = ACCESS_GRANTED;
     84    }
     85    else if("list".equals(requestedName) && (0 < allowedIndicatorsUserDetails.getAllowedIndicatorNameSet().size())) {
    8186      result = ACCESS_GRANTED;
    8287    }
Note: See TracChangeset for help on using the changeset viewer.