KVM Entries are not getting created using Apigee Maven Config plugin

Not applicable

KVM Entries are not getting created using Apigee Maven Config plugin, there are no errors , but i do not see the KVM entries created in Apigee Edge.

Solved Solved
0 7 585
1 ACCEPTED SOLUTION

@Rahul Nair

As the error states, you cant have a plain text KVM in an org that is HIPAA compliant. Please add the following line to the KVM config in your edge.json

"encrypted" : "true"

For example

{   
 "name" : "Map_name",
 "encrypted" : "true",
 "entry" : [ 
  {
   "name" : "Org_Key1",
   "value" : "value_one"
  },
  {
   "name" : "Org_Key2",
   "value" : "value_two"
  } 
 ]
}

Try that and see if it works

View solution in original post

7 REPLIES 7

@Rahul Nair - will need more info to provide help.

  1. What is the command you are using ?
  2. Are you using edge.json or the resources folder structure ?
  3. Did you run the command using -X options to see in debug mode?
  4. Did you try the samples in GitHub ?
  5. Can you share your pom file ?

Not applicable

Please find the answers.

1) Using this command mvn install -Ptest -Dusername=<your-apigee-username> -Dpassword=<your-apigee-password> -Dapigee.config.options=create

2) Yes i am using the edge.json in resource folder

3) I did try that, infact now i am able to reproduce the error i was initially getting, please find the stack trace for KVM creation.

This is the error You can only create encrypted keyvaluemaps in Hipaa organizations, can you let me know how to pass an encrypted KVM via edge.json to Apigee maven config plugin.

Request prepared for the server ************************** GET https://api.enterprise.apigee.com/v1/organizations/shire-nonprod/keyvaluemaps accept: application/json accept-encoding: gzip authorization: Basic [Not shown in log] [DEBUG] output application/json [DEBUG] [ ] [INFO] Creating Org KVM - user_account_status [INFO] Request prepared for the server ************************** POST https://api.enterprise.apigee.com/v1/organizations/shire-nonprod/keyvaluemaps accept: application/json accept-encoding: gzip authorization: Basic [Not shown in log] content-type: application/json [Request body] {"entry":[{"name":"ACTIVE","value":"001"},{"name":"DISABLED","value":"002"}],"name":"user_account_status"} [ERROR] Apigee call failed 500 Server Error { "code" : "keyvaluemap.service.KeyValueMapMustBeEncrypted", "message" : "You can only create encrypted keyvaluemaps in Hipaa organizations.", "contexts" : [ ] } [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13.561 s [INFO] Finished at: 2018-05-03T09:28:13-05:00 [INFO] Final Memory: 10M/24M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.apigee.edge.config:apigee-config-maven-plugin:1.2.1:keyvaluemaps (create-config-kvm) on project ConfigOnly: Apigee network call error 500 Server Error [ERROR] { [ERROR] "code" : "keyvaluemap.service.KeyValueMapMustBeEncrypted", [ERROR] "message" : "You can only create encrypted keyvaluemaps in Hipaa organizations.", [ERROR] "contexts" : [ ] [ERROR] } [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.apigee.edge.config:apigee-config-maven-plugin:1.2.1:keyvaluemaps (create-config-kvm) on project ConfigOnly: Apigee network call error 500 Server Error { "code" : "keyvaluemap.service.KeyValueMapMustBeEncrypted", "message" : "You can only create encrypted keyvaluemaps in Hipaa organizations.", "contexts" : [ ] } at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146) at \

The error is pretty self explanatory. Your Apigee org is HIPAA compliant and the Management API will not let you create a plain text key-value pair.

You must create an encrypted KVM.

To do this, in your edge.json, add

encrypted=true

in your KVM definition

If you still encounter issues, please paste the content of your edge.json file

Thank you @rmishra it worked!

@Rahul Nair

As the error states, you cant have a plain text KVM in an org that is HIPAA compliant. Please add the following line to the KVM config in your edge.json

"encrypted" : "true"

For example

{   
 "name" : "Map_name",
 "encrypted" : "true",
 "entry" : [ 
  {
   "name" : "Org_Key1",
   "value" : "value_one"
  },
  {
   "name" : "Org_Key2",
   "value" : "value_two"
  } 
 ]
}

Try that and see if it works

Thank you @Sai Saran Vaidyanathan, adding encrypted element in JSON fixed the issue.

Glad it worked