Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-4840

Audit aging : When invalid action is provided for audit ageout , Atlas throws 500

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • atlas-core
    • None

    Description

      PROBLEM STATEMENT:

      When invalid action is provided for audit action , Atlas throws 500 

       

      STEPS TO REPRODUCE:

      Post the following payload to ageout 

      {"auditAgingEnabled": true, 
      "defaultAgeoutEnabled": false,
       "createEventsAgeoutAllowed": false, 
      "auditSweepoutEnabled": false, 
      "ignoreDefaultAgeoutTTL": false,
       "customAgeoutAuditCount": 5, 
      "customAgeoutActionTypes": "INVALID_ACTION"}

       

      CURRENT BEHAVIOUR:

      Atlas throws 500 with exception 

      ava.lang.IllegalArgumentException: No enum constant org.apache.atlas.model.audit.EntityAuditEventV2.EntityAuditActionV2.INVALID_ACTION 

       

      EXPECTED BEHAVIOUR:

      Atlas to throw 400 bad request or 404 action not found

      OCCURRENCE:

      Consistently reproducible.

       

       

      LOG ARTIFACTS:

      Atlas logs :

      2023-10-17 09:40:14,933 ERROR org.apache.atlas.web.errors.ExceptionMapperUtil: [etp776484396-171 - 14eb7b5e-1e3b-4c49-89df-15ace96b9b9c]: Error handling a request: a686b52e776a3b22
      java.lang.IllegalArgumentException: No enum constant org.apache.atlas.model.audit.EntityAuditEventV2.EntityAuditActionV2.INVALID_ACTION
              at org.apache.atlas.repository.audit.AtlasAuditReductionService.getValidActionTypes(AtlasAuditReductionService.java:321) ~[atlas-repository-2.1.0.7.2.18.0-406.jar:2.1.0.7.2.18.0-406]
              at org.apache.atlas.repository.audit.AtlasAuditReductionService.buildAgeoutCriteriaForAllAgingTypes(AtlasAuditReductionService.java:195) ~[atlas-repository-2.1.0.7.2.18.0-406.jar:2.1.0.7.2.18.0-406]
              at org.apache.atlas.web.resources.AdminResource.ageoutAuditData(AdminResource.java:869) ~[atlas-webapp-2.1.0.7.2.18.0-406.jar:?]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_382]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_382]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_382]
              at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_382]
              at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) ~[jersey-server-1.19.4.jar:1.19.4]
              at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185) ~[jersey-server-1.19.4.jar:1.19.4]
              at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) ~[jersey-server-1.19.4.jar:1.19.4]
              at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) ~[jersey-server-1.19.4.jar:1.19.4]
              at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.19.4.jar:1.19.4]
              at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) ~[jersey-server-1.19.4.jar:1.19.4]
              at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.19.4.jar:1.19.4]
              at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) ~[jersey-server-1.19.4.jar:1.19.4]
              at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) ~[jersey-server-1.19.4.jar:1.19.4]
              at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) ~[jersey-server-1.19.4.jar:1.19.4]
              at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) ~[jersey-server-1.19.4.jar:1.19.4]
              at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) ~[jersey-server-1.19.4.jar:1.19.4]
              at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) ~[jersey-servlet-1.19.4.jar:1.19.4]
              at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558) ~[jersey-servlet-1.19.4.jar:1.19.4]
              at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733) ~[jersey-servlet-1.19.4.jar:1.19.4]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api-3.1.0.jar:3.1.0]

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            sharmadhas Sharmadha S
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: