Apigee Data Masking per env

I need to mask some query param in a proxy and got a test that works. I followed https://docs.apigee.com/api-platform/security/data-masking

Is it possible to apply maskconfig to a specific deployment environment? If so how? Seems that maskconfig is applied to all environments.

curl -H "Content-type:text/xml" -X POST --data @mask.xml https://api.enterprise.apigee.com/v1/o/my-orgl/apis/proxy1/maskconfigs -u john.doe@company.com

We are using Apigee Edge cloud.

0 21 682
21 REPLIES 21

As far as I know there are maskconfigs for organizations, or for API proxies.

But I don't think there is a maskconfig for an environment.

You can try yourself using the API.

PUT :mgmtserver/v1/o/:orgname/maskconfigs/:name
POST :mgmtserver/v1/o/:orgname/maskconfigs/:name
PUT :mgmtserver/v1/o/:orgname/apis/:proxy/maskconfigs/:name
POST :mgmtserver/v1/o/:orgname/apis/:proxy/maskconfigs/:name

The corresponding URL for environments would insert "/e /:env" into the urls for the org. I tried showing it here with another code snip but for some reason this community doesn't let me do it.

I think I tried this once and discovered that there is no possibility to manage maskconfigs at the environment level.

Thanks @Dino-at-Google

I noticed the same thing - can apply mask config at org level, but not per env. I posted question just in case.

Can we do data-making thru Jenkins? In the edge.json file, I am using the below code to mask. But still, when I am seeing the in trace the values are showing, it's not masking with ***. 

{
"version": "1.0",
"maskconfigs": [
{
"name": "default",
"variables": [
"request.header.X-Forwarded-Proto"
]
}
]
}

maybe @ssvaidyanathan knows?

The json file format is incorrect, try this

{
   "version":"1.0",
   "orgConfig":{
      "maskconfigs":[
         {
            "variables":[
               "request.header.X-Forwarded-Proto"
            ]
         }
      ]
   }
}

I have tried still not able to see data masking in the trace

you may need to undeploy & redeploy the API Proxy before seeing the datamask results in the trace.

Can you please share the console output after you run the mvn command? Can you confirm from the console logs that the datamask was configured?

04:40:37 → Warning: Collation completed but no code bundles were found in the tag DataMaskTest from repository api00_cce_apigee.
04:40:37 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[Pipeline] echo04:40:37 ====================================================================================================
04:40:37 → Collating configuration files in tag DataMaskTest
04:40:37 ====================================================================================================[Pipeline] fileExists[Pipeline] sh04:40:38 + set +x[Pipeline] sh04:40:38 + cd ../artifactBundles
04:40:38 + mkdir -p releaseBundle_apiproxyname
04:40:38 + cp ../centralRepo/shared-pom.xml releaseBundle_apiproxyname
04:40:38 + cp ../centralRepo/pom.xml releaseBundle_apiproxyname
04:40:38 + mkdir -p releaseBundle_apiproxyname/config
04:40:38 + mkdir -p releaseBundle_apiproxyname/config/env
04:40:38 + mkdir -p releaseBundle_apiproxyname/config/env/dev
04:40:38 + cp ../artifactRepo/code/config/env/dev/apiproxyname_edge.json ./releaseBundle_apiproxyname/config/env/dev[Pipeline] fileExists[Pipeline] fileExists[Pipeline] fileExists[Pipeline] fileExists[Pipeline] fileExists[Pipeline] fileExists[Pipeline] fileExists[Pipeline] }[Pipeline] // dir[Pipeline] echo04:40:39 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
04:40:39 → Succesfully collated configurations for the following artifacts:
04:40:39 [apiproxyname]
04:40:39 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[Pipeline] fileExists[Pipeline] sh04:40:39 + set +x[Pipeline] sh04:40:39 + set +x[Pipeline] echo04:40:39 ====================================================================================================
04:40:39 → Stage Completed: Build Artifacts
04:40:39 ====================================================================================================[Pipeline] }[Pipeline] // stage[Pipeline] stage[Pipeline] { (Lint Artifacts)[Pipeline] echo04:40:39 ****************************************************************************************************
04:40:39 Entering Stage: Lint Artifacts
04:40:39 ****************************************************************************************************[Pipeline] echo04:40:39 ====================================================================================================
04:40:39 → Warning: Linting skipped. No code bundles exist in the tag DataMaskTest from repository api00_cce_apigee.
04:40:39 ====================================================================================================[Pipeline] }[Pipeline] // stage[Pipeline] stage[Pipeline] { (Deploy Artifacts)[Pipeline] echo04:40:40 ****************************************************************************************************
04:40:40 Entering Stage: Deploy Artifacts Into keybank-non-prod dev
04:40:40 ****************************************************************************************************[Pipeline] echo04:40:40 ====================================================================================================
04:40:40 → Verifying dependency checks...
04:40:40 ====================================================================================================[Pipeline] echo04:40:40 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
04:40:40 → Warning: No deployment dependency checks to verify.
04:40:40 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cp ../artifactRepo/code/config/env/dev/apiproxyname_edge.json ./releaseBundle_apiproxyname/config/env/dev[Pipeline] fileExists[Pipeline] fileExists[Pipeline] fileExists[Pipeline]  

We have written the data mask code in edge.json file under dev env. 

 

cp ../artifactRepo/code/config/env/dev/apiproxyname_edge.json ./releaseBundle_apiproxyname/config/env/dev[Pipeline] fileExists[Pipeline] fileExists[Pipeline] fileExists[Pipeline]  

We have written the data mask code in edge.json file under dev env. 

 

Started by user XLRS04P
Obtained jenkinsfiles/Jenkinsfile-standard-build-template-autotagging-apigee-1.0.0 from git https://git.keybank.com/scm/api00/api00_cicd.git
Loading library XL@master
Attempting to resolve master from remote references...
 > /bin/git --version # timeout=10
 > git --version # 'git version 1.8.3.1'
using GIT_ASKPASS to set credentials xlrs03p for TeamForge checkouts
 > /bin/git ls-remote -h https://git.keybank.com/scm/xld00/xld00_jenkinslibs.git # timeout=10
Found match: refs/heads/master revision edd88246dd00f32b6dde26a9b5db31479b04568f
Selected Git installation does not exist. Using Default
The recommended git tool is: NONE
using credential xlrs03p
 > /bin/git rev-parse --resolve-git-dir /var/opt/jenkins/jobs/API/jobs/standard-build-template-autotagging-apigee-1.0.0/workspace@libs/XL/.git # timeout=10
Fetching changes from the remote Git repository
 > /bin/git config remote.origin.url https://git.keybank.com/scm/xld00/xld00_jenkinslibs.git # timeout=10
Fetching without tags
Fetching upstream changes from https://git.keybank.com/scm/xld00/xld00_jenkinslibs.git
 > /bin/git --version # timeout=10
 > git --version # 'git version 1.8.3.1'
using GIT_ASKPASS to set credentials xlrs03p for TeamForge checkouts
 > /bin/git fetch --no-tags --progress https://git.keybank.com/scm/xld00/xld00_jenkinslibs.git +refs/heads/*:refs/remotes/origin/* # timeout=10
Checking out Revision edd88246dd00f32b6dde26a9b5db31479b04568f (master)
 > /bin/git config core.sparsecheckout # timeout=10
 > /bin/git checkout -f edd88246dd00f32b6dde26a9b5db31479b04568f # timeout=10
Commit message: "Pull request #8: let wbm use curly brackets without having XLD freak out"
Loading library workflow-libs@master
Attempting to resolve master from remote references...
 > /usr/bin/git --version # timeout=10
 > git --version # 'git version 1.8.3.1'
using GIT_ASKPASS to set credentials xlrs03p for TeamForge checkouts
 > /usr/bin/git ls-remote https://git.keybank.com/scm/jen00/jen00_workflowlibs.git # timeout=10
Found match: refs/heads/master revision 2450c884258f3cf398093e8127835fa9b8ea6577
The recommended git tool is: NONE
using credential xlrs03p
 > /usr/bin/git rev-parse --resolve-git-dir /var/opt/jenkins/jobs/API/jobs/standard-build-template-autotagging-apigee-1.0.0/workspace@libs/workflow-libs/.git # timeout=10
Fetching changes from the remote Git repository
 > /usr/bin/git config remote.origin.url https://git.keybank.com/scm/jen00/jen00_workflowlibs.git # timeout=10
Fetching without tags
Fetching upstream changes from https://git.keybank.com/scm/jen00/jen00_workflowlibs.git
 > /usr/bin/git --version # timeout=10
 > git --version # 'git version 1.8.3.1'
using GIT_ASKPASS to set credentials xlrs03p for TeamForge checkouts
 > /usr/bin/git fetch --no-tags --progress https://git.keybank.com/scm/jen00/jen00_workflowlibs.git +refs/heads/*:refs/remotes/origin/* # timeout=10
Checking out Revision 2450c884258f3cf398093e8127835fa9b8ea6577 (master)
 > /usr/bin/git config core.sparsecheckout # timeout=10
 > /usr/bin/git checkout -f 2450c884258f3cf398093e8127835fa9b8ea6577 # timeout=10
Commit message: "libs"
[Pipeline] Start of Pipeline[Pipeline] podTemplate[Pipeline] {[Pipeline] nodeCreated Pod: GKE-OP devops/apigee-2r6nq-4199r
[Normal][devops/apigee-2r6nq-4199r][Scheduled] Successfully assigned devops/apigee-2r6nq-4199r to sdc01gketssun25
[Normal][devops/apigee-2r6nq-4199r][Pulling] Pulling image "registry.keybank.com/docker/keybank/jnlp"
[Normal][devops/apigee-2r6nq-4199r][Pulled] Successfully pulled image "registry.keybank.com/docker/keybank/jnlp" in 190.332637ms
[Normal][devops/apigee-2r6nq-4199r][Created] Created container jnlp
[Normal][devops/apigee-2r6nq-4199r][Started] Started container jnlp
[Normal][devops/apigee-2r6nq-4199r][Pulling] Pulling image "registry.keybank.com/docker/keybank/apigee-builder"
[Normal][devops/apigee-2r6nq-4199r][Pulled] Successfully pulled image "registry.keybank.com/docker/keybank/apigee-builder" in 255.664614ms
[Normal][devops/apigee-2r6nq-4199r][Created] Created container apigee
[Normal][devops/apigee-2r6nq-4199r][Started] Started container apigee
[Normal][devops/apigee-2r6nq-4199r][Pulling] Pulling image "registry.keybank.com/docker/keybank/maven-xl-gke"
[Normal][devops/apigee-2r6nq-4199r][Pulled] Successfully pulled image "registry.keybank.com/docker/keybank/maven-xl-gke" in 191.881347ms
[Normal][devops/apigee-2r6nq-4199r][Created] Created container maven
[Normal][devops/apigee-2r6nq-4199r][Started] Started container mavenAgent apigee-2r6nq-4199r is provisioned from template apigee-2r6nq
---
apiVersion: "v1"
kind: "Pod"
metadata:
  annotations:
    buildUrl: "http://cwb02dacoapp02.keybank.com:8080/job/API/job/standard-build-template-autotagging-apigee-1.0.0/..."
    runUrl: "job/API/job/standard-build-template-autotagging-apigee-1.0.0/555/"
  labels:
    jenkins: "slave"
    jenkins/label-digest: "983bdbbff7e527d4a9b6870cab4f79eef85dd23b"
    jenkins/label: "apigee"
  name: "apigee-2r6nq-4199r"
spec:
  containers:
  - env:
    - name: "JENKINS_SECRET"
      value: "********"
    - name: "JENKINS_AGENT_NAME"
      value: "apigee-2r6nq-4199r"
    - name: "JENKINS_NAME"
      value: "apigee-2r6nq-4199r"
    - name: "JENKINS_AGENT_WORKDIR"
      value: "/home/jenkins/agent"
    - name: "JENKINS_URL"
      value: "http://cwb02dacoapp02.keybank.com:8080/"
    image: "registry.keybank.com/docker/keybank/jnlp"
    name: "jnlp"
    resources:
      limits: {}
      requests:
        memory: "256Mi"
        cpu: "100m"
    volumeMounts:
    - mountPath: "/home/jenkins/agent"
      name: "workspace-volume"
      readOnly: false
  - command:
    - "cat"
    image: "registry.keybank.com/docker/keybank/apigee-builder"
    name: "apigee"
    securityContext:
      privileged: true
    tty: true
    volumeMounts:
    - mountPath: "/home/jenkins/agent"
      name: "workspace-volume"
      readOnly: false
  - command:
    - "cat"
    image: "registry.keybank.com/docker/keybank/maven-xl-gke"
    name: "maven"
    securityContext:
      privileged: true
    tty: true
    volumeMounts:
    - mountPath: "/home/jenkins/agent"
      name: "workspace-volume"
      readOnly: false
  nodeSelector:
    kubernetes.io/os: "linux"
  restartPolicy: "Never"
  securityContext:
    runAsUser: 998
  volumes:
  - emptyDir:
      medium: ""
    name: "workspace-volume"

Running on apigee-2r6nq-4199r in /home/jenkins/agent/workspace/API/standard-build-template-autotagging-apigee-1.0.0[Pipeline] {[Pipeline] timestamps[Pipeline] {[Pipeline] withCredentials04:40:22  Masking supported pattern matches of $NONPROD_USERNAME or $NONPROD_PASSWORD[Pipeline] {[Pipeline] sh04:40:23  + set +x[Pipeline] readJSON[Pipeline] }[Pipeline] // withCredentials[Pipeline] stage[Pipeline] { (Checkout Source Code)[Pipeline] echo04:40:24  ****************************************************************************************************
04:40:24                                  Entering Stage: Checkout Source Code                                
04:40:24  ****************************************************************************************************[Pipeline] dir04:40:24  Running in /home/jenkins/agent/workspace/API/standard-build-template-autotagging-apigee-1.0.0/centralRepo[Pipeline] {[Pipeline] echo04:40:24  ====================================================================================================
04:40:24  → Checking out central repo
04:40:24  ====================================================================================================[Pipeline] checkout04:40:24  The recommended git tool is: /usr/bin/git
04:40:25  using credential xlrs03p
04:40:25  Cloning the remote Git repository
04:40:26  Cloning repository https://git.keybank.com/scm/api00/api00_cicd.git
04:40:26   > /usr/bin/git init /home/jenkins/agent/workspace/API/standard-build-template-autotagging-apigee-1.0.0/centralRepo # timeout=10
04:40:26  Fetching upstream changes from https://git.keybank.com/scm/api00/api00_cicd.git
04:40:26   > /usr/bin/git --version # timeout=10
04:40:26   > git --version # 'git version 2.11.0'
04:40:26  using GIT_ASKPASS to set credentials xlrs03p for TeamForge checkouts
04:40:26   > /usr/bin/git fetch --tags --progress -- https://git.keybank.com/scm/api00/api00_cicd.git +refs/heads/*:refs/remotes/origin/* # timeout=10
04:40:27  Avoid second fetch
04:40:27  Checking out Revision 459d47b8b8cab00e13884ef1fed79c79224666f0 (refs/remotes/origin/master)
04:40:27   > /usr/bin/git config remote.origin.url https://git.keybank.com/scm/api00/api00_cicd.git # timeout=10
04:40:27   > /usr/bin/git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
04:40:27   > /usr/bin/git rev-parse refs/remotes/origin/master^{commit} # timeout=10
04:40:27   > /usr/bin/git config core.sparsecheckout # timeout=10
04:40:27   > /usr/bin/git checkout -f 459d47b8b8cab00e13884ef1fed79c79224666f0 # timeout=10
04:40:30  Commit message: "Pull request #1: Jenkinsfile-standard-release-template-apigee-1.0.0 edited online with Bitbucket"
04:40:30   > /usr/bin/git rev-list --no-walk 459d47b8b8cab00e13884ef1fed79c79224666f0 # timeout=10[Pipeline] echo04:40:30  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
04:40:30  → Checked out central repository successfully.
04:40:30  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[Pipeline] }[Pipeline] // dir[Pipeline] dir04:40:30  Running in /home/jenkins/agent/workspace/API/standard-build-template-autotagging-apigee-1.0.0/artifactRepo[Pipeline] {[Pipeline] echo04:40:30  ====================================================================================================
04:40:30  → Checking out DataMaskTest from artifact repo api00_cce_apigee
04:40:30  ====================================================================================================[Pipeline] checkout04:40:30  The recommended git tool is: NONE
04:40:30  using credential xlrs03p
04:40:31  Cloning the remote Git repository
04:40:31  Cloning repository https://git.keybank.com/scm/api00/api00_cce_apigee.git
04:40:31   > /usr/bin/git init /home/jenkins/agent/workspace/API/standard-build-template-autotagging-apigee-1.0.0/artifactRepo # timeout=10
04:40:31  Fetching upstream changes from https://git.keybank.com/scm/api00/api00_cce_apigee.git
04:40:31   > /usr/bin/git --version # timeout=10
04:40:31   > git --version # 'git version 2.11.0'
04:40:31  using GIT_ASKPASS to set credentials xlrs03p for TeamForge checkouts
04:40:31   > /usr/bin/git fetch --tags --progress -- https://git.keybank.com/scm/api00/api00_cce_apigee.git +refs/heads/*:refs/remotes/origin/* # timeout=10
04:40:36  Avoid second fetch
04:40:36  JENKINS-19022: warning: possible memory leak due to Git plugin usage; see: https://plugins.jenkins.io/git/#remove-git-plugin-buildsbybranch-builddata-script
04:40:36  Checking out Revision 1e1dc18bdeb0dcd7092c2cd6dcc4af0e6bc82acb (tags/DataMaskTest)
04:40:36  Commit message: "datamask"[Pipeline] echo04:40:37  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
04:40:37  → Checked out api00_cce_apigee repository successfully.
04:40:37  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[Pipeline] }[Pipeline] // dir[Pipeline] }[Pipeline] // stage[Pipeline] echo04:40:37  ====================================================================================================
04:40:37  → Stage Completed: Checkout Source Code
04:40:37  ====================================================================================================[Pipeline] stage[Pipeline] { (Build Artifacts)[Pipeline] echo04:40:37  ****************************************************************************************************
04:40:37                                    Entering Stage: Build Artifacts                                   
04:40:37  ****************************************************************************************************[Pipeline] sh04:40:37  + mkdir artifactBundles[Pipeline] dir04:40:37  Running in /home/jenkins/agent/workspace/API/standard-build-template-autotagging-apigee-1.0.0/temp[Pipeline] {[Pipeline] echo04:40:37  ====================================================================================================
04:40:37  → Collating code bundles in tag DataMaskTest
04:40:37  ====================================================================================================[Pipeline] fileExists04:40:36   > /usr/bin/git config remote.origin.url https://git.keybank.com/scm/api00/api00_cce_apigee.git # timeout=10
04:40:36   > /usr/bin/git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
04:40:36   > /usr/bin/git rev-parse refs/remotes/origin/tags/DataMaskTest^{commit} # timeout=10
04:40:36   > /usr/bin/git rev-parse tags/DataMaskTest^{commit} # timeout=10
04:40:36   > /usr/bin/git config core.sparsecheckout # timeout=10
04:40:36   > /usr/bin/git checkout -f 1e1dc18bdeb0dcd7092c2cd6dcc4af0e6bc82acb # timeout=10[Pipeline] echo04:40:37  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
04:40:37  → Warning: Collation completed but no code bundles were found in the tag DataMaskTest from repository api00_cce_apigee.
04:40:37  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[Pipeline] echo04:40:37  ====================================================================================================
04:40:37  → Collating configuration files in tag DataMaskTest
04:40:37  ====================================================================================================[Pipeline] fileExists[Pipeline] sh04:40:38  + set +x[Pipeline] sh04:40:38  + cd ../artifactBundles
04:40:38  + mkdir -p releaseBundle_CCE-BankDetails-KeyQuick
04:40:38  + cp ../centralRepo/shared-pom.xml releaseBundle_CCE-BankDetails-KeyQuick
04:40:38  + cp ../centralRepo/pom.xml releaseBundle_CCE-BankDetails-KeyQuick
04:40:38  + mkdir -p releaseBundle_CCE-BankDetails-KeyQuick/config
04:40:38  + mkdir -p releaseBundle_CCE-BankDetails-KeyQuick/config/env
04:40:38  + mkdir -p releaseBundle_CCE-BankDetails-KeyQuick/config/env/dev
04:40:38  + cp ../artifactRepo/code/config/env/dev/CCE-BankDetails-KeyQuick_edge.json ./releaseBundle_CCE-BankDetails-KeyQuick/config/env/dev[Pipeline] fileExists[Pipeline] fileExists[Pipeline] fileExists[Pipeline] fileExists[Pipeline] fileExists[Pipeline] fileExists[Pipeline] fileExists[Pipeline] }[Pipeline] // dir[Pipeline] echo04:40:39  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
04:40:39  → Succesfully collated configurations for the following artifacts:
04:40:39    [CCE-BankDetails-KeyQuick]
04:40:39  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[Pipeline] fileExists[Pipeline] sh04:40:39  + set +x[Pipeline] sh04:40:39  + set +x[Pipeline] echo04:40:39  ====================================================================================================
04:40:39  → Stage Completed: Build Artifacts
04:40:39  ====================================================================================================[Pipeline] }[Pipeline] // stage[Pipeline] stage[Pipeline] { (Lint Artifacts)[Pipeline] echo04:40:39  ****************************************************************************************************
04:40:39                                     Entering Stage: Lint Artifacts                                   
04:40:39  ****************************************************************************************************[Pipeline] echo04:40:39  ====================================================================================================
04:40:39  → Warning: Linting skipped. No code bundles exist in the tag DataMaskTest from repository api00_cce_apigee.
04:40:39  ====================================================================================================[Pipeline] }[Pipeline] // stage[Pipeline] stage[Pipeline] { (Deploy Artifacts)[Pipeline] echo04:40:40  ****************************************************************************************************
04:40:40                       Entering Stage: Deploy Artifacts Into keybank-non-prod dev                     
04:40:40  ****************************************************************************************************[Pipeline] echo04:40:40  ====================================================================================================
04:40:40  → Verifying dependency checks...
04:40:40  ====================================================================================================[Pipeline] echo04:40:40  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
04:40:40  → Warning: No deployment dependency checks to verify.
04:40:40  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[Pipeline] echo04:40:40  ====================================================================================================
04:40:40  → Deploying configurations for artifacts
04:40:40  ====================================================================================================[Pipeline] dir04:40:40  Running in /home/jenkins/agent/workspace/API/standard-build-template-autotagging-apigee-1.0.0/artifactBundles[Pipeline] {[Pipeline] fileExists[Pipeline] echo04:40:40  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
04:40:40  → Deploying configurations for artifact: CCE-BankDetails-KeyQuick
04:40:40  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[Pipeline] container[Pipeline] {[Pipeline] sh04:40:41  + set +x[Pipeline] sh04:40:59  + set +x[Pipeline] sh04:41:03  + set +x[Pipeline] echo04:41:05  → Successfully configured CCE-BankDetails-KeyQuick.[Pipeline] }[Pipeline] // container[Pipeline] }[Pipeline] // dir[Pipeline] echo04:41:06  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
04:41:06  → Successfully configured all artifacts.
04:41:06  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[Pipeline] echo04:41:06  ====================================================================================================
04:41:06  → Deploying code for artifacts
04:41:06  ====================================================================================================[Pipeline] echo04:41:06  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
04:41:06  → → Warning: Code deployment skipped. No code bundles exist in the tag DataMaskTest in api00_cce_apigee repository.
04:41:06  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[Pipeline] echo04:41:06  ====================================================================================================
04:41:06  → Packaging artifacts...
04:41:06  ====================================================================================================[Pipeline] dir04:41:06  Running in /home/jenkins/agent/workspace/API/standard-build-template-autotagging-apigee-1.0.0/artifactBundles[Pipeline] {[Pipeline] fileExists[Pipeline] sh04:41:06  + set +x[Pipeline] }[Pipeline] // dir[Pipeline] echo04:41:06  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
04:41:06  → Finished packaging all artifacts.
04:41:06  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[Pipeline] echo04:41:06  ====================================================================================================
04:41:06  → Stage Completed: Deploy Artifacts
04:41:06  ====================================================================================================[Pipeline] }[Pipeline] // stage[Pipeline] stage[Pipeline] { (Test Artifacts)[Pipeline] echo04:41:07  ****************************************************************************************************
04:41:07                                     Entering Stage: Test Artifacts                                   
04:41:07  ****************************************************************************************************[Pipeline] container[Pipeline] {[Pipeline] sh04:41:07  + set +x
04:41:08  newman
04:41:08  
04:41:08  CCE-BankDetails-KeyQuick
04:41:08  
04:41:08  ❏ Apigee
04:41:08  ↳ OYD-Token
04:41:09    POST https://api-dev.keybank.com/oauth/v1/token [200 OK, 1.96kB, 446ms]
04:41:09  
04:41:09  ↳ BankDetails
04:41:09    POST https://api-dev.keybank.com/keyQuick/v1/GetKeyQuickHomeURL [403 Request is forbidden to access the resource, 989B, 191ms]
04:41:09  
04:41:09  ↳ HealthCheck
04:41:09    GET https://api-dev.keybank.com/keyQuick/v1/healthCheck [500 Internal Server Error, 837B, 106ms]
04:41:09  
04:41:09  ┌─────────────────────────┬─────────────────────┬────────────────────┐
04:41:09  │                         │            executed │             failed │
04:41:09  ├─────────────────────────┼─────────────────────┼────────────────────┤
04:41:09  │              iterations │                   1 │                  0 │
04:41:09  ├─────────────────────────┼─────────────────────┼────────────────────┤
04:41:09  │                requests │                   3 │                  0 │
04:41:09  ├─────────────────────────┼─────────────────────┼────────────────────┤
04:41:09  │            test-scripts │                   1 │                  0 │
04:41:09  ├─────────────────────────┼─────────────────────┼────────────────────┤
04:41:09  │      prerequest-scripts │                   0 │                  0 │
04:41:09  ├─────────────────────────┼─────────────────────┼────────────────────┤
04:41:09  │              assertions │                   0 │                  0 │
04:41:09  ├─────────────────────────┴─────────────────────┴────────────────────┤
04:41:09  │ total run duration: 819ms                                          │
04:41:09  ├────────────────────────────────────────────────────────────────────┤
04:41:09  │ total data received: 2.07kB (approx)                               │
04:41:09  ├────────────────────────────────────────────────────────────────────┤
04:41:09  │ average response time: 247ms [min: 106ms, max: 446ms, s.d.: 144ms] │
04:41:09  └────────────────────────────────────────────────────────────────────┘[Pipeline] }[Pipeline] // container[Pipeline] }[Pipeline] // stage[Pipeline] echo04:41:09  ====================================================================================================
04:41:09  → Stage Complete: Test Artifacts
04:41:09  ====================================================================================================[Pipeline] stage[Pipeline] { (Push Artifacts To XLD)[Pipeline] echo04:41:09  ****************************************************************************************************
04:41:09                                 Entering Stage: Push Artifacts to XLD                                
04:41:09  ****************************************************************************************************[Pipeline] container[Pipeline] {[Pipeline] sh04:41:10  + set +x[Pipeline] sh04:41:16  + set +x[Pipeline] }[Pipeline] // container[Pipeline] xldCreatePackage04:41:17  XL Deploy package created : /home/jenkins/agent/workspace/API/standard-build-template-autotagging-apigee-1.0.0/DataMaskTest_2023-05-26T04.40.dar[Pipeline] echo04:41:17  Push image to XL Deploy[Pipeline] xldPublishPackage04:41:17  Info: Searching for 'DataMaskTest_2023-05-26T04.40.dar' in '/home/jenkins/agent/workspace/API/standard-build-template-autotagging-apigee-1.0.0'
04:41:17  Info: Found file(s): [DataMaskTest_2023-05-26T04.40.dar][Pipeline] }[Pipeline] // stage[Pipeline] echo04:41:17  ====================================================================================================
04:41:17  → Artifacts pushed to XLD successfully.
04:41:17  ====================================================================================================[Pipeline] echo04:41:17  ====================================================================================================
04:41:17  → Stage Complete: Push Artifacts to XLD
04:41:17  ====================================================================================================[Pipeline] writeFile[Pipeline] echo04:41:18  ====================================================================================================
04:41:18  → Sending email confirmation of build success...
04:41:18  ====================================================================================================[Pipeline] sh04:41:18  + TZ=America/New_York date[Pipeline] emailext04:41:18  Sending email to: apigee_ops@keybank.com xlrs04p@keybank.com[Pipeline] }[Pipeline] // timestamps[Pipeline] }[Pipeline] // node[Pipeline] }[Pipeline] // podTemplate[Pipeline] End of PipelineFinished: SUCCESS

Dont see the Maven logs? Are you sure its executing the goal?

Yes because in the edge.json file, we have code for product KVM creations along with data mask. After the build success, I could see the product and KVM were created in respective env but data masking is not happening. If maven goals are not executed it should not work for the product and KVM also.  So even though I have tried only the data mask code in the edge.json file still not working. Looks like we need to add some plugins in Maven to deploy the data mask configuration. Do you know which plugin it is?

Can you confirm you have the maskconfig goal in your pom.xml? How are you calling the mvn command? Are you running `mvn install` or running the goal individually? If you are running `mvn install` you need to make sure that you have the maskconfig goal added to your pom

 

<execution> 
    <id>create-config-maskconfigs</id>
    <phase>install</phase>
    <goals>
        <goal>maskconfigs</goal>
    </goals>
</execution>

 

Make sure this is added to your pom just like how you have it for keyvaluemaps and apiproducts

 

No the above plugin is not configured in pom. But i have refered the below 

https://github.com/apigee/apigee-config-maven-plugin/tree/master/samples/EdgeConfig

https://github.com/apigee/apigee-config-maven-plugin/blob/master/samples/EdgeConfig/edge.json

I dint find any plugin sharedpom.xml. and confirmed those steps were working. But i will try to add mask configuration pom.xml as per your suggestion

Just adding the info to edge.json will not push the config to Apigee. You need to either call the goal individually or have that in you pom so that it executes it when you run "mvn install"

Ihave added the configuration in pom.xml still its not working

@majjiku - just stating its not working will not help me unfortunately. You need to provide more info like what you added. How are you calling the goal? Console output, etc

Hello @ssvaidyanathan , If I'm not mistaken, the apigee-config-maven-plugin v2.7.0 (For Apigee Hybrid and Apigee X) does not support the "maskconfigs" goal? Are there plans to add this feature in future releases? Thanks! 

@AlexCh - yes, can you open a GitHub issue please. Please mention this is for Apigee X/hybrid

Thanks a lot, @ssvaidyanathan, I have created an issue for this feature https://github.com/apigee/apigee-config-maven-plugin/issues/199

Thanks.. Will work on it and update on the GitHub issue directly