ml-gradle icon indicating copy to clipboard operation
ml-gradle copied to clipboard

Deploy Cert auth, templates AND host certificates

Open grtjn opened this issue 2 years ago • 2 comments

mlDeploySecurity does all three (and a lot more), but you cannot do all three separately. You can mlDeployCertificateAuthorities, and mlDeployCertificateTemplates, but no mlDeployHostCertificates (to match the underlying command InsertCertificateHostsTemplateCommand).

Is there a workaround (using build.gradle only) and/or can this be added?

grtjn avatar Sep 19 '22 12:09 grtjn

@grtjn This looks like an oversight. I don't see any reason why the InsertCertificateHostsTemplateCommand can't be run in isolation. I'll add it to the next release.

In the meantime, you can make a custom task like this (which I thought was documented somewhere but I'm not seeing it, so I'll get it documented as part of this ticket too):

task myTask(type: com.marklogic.gradle.task.MarkLogicTask) {
  doLast {
    new com.marklogic.appdeployer.command.security.InsertCertificateHostsTemplateCommand().execute(getCommandContext())
  }
}

rjrudin avatar Sep 20 '22 14:09 rjrudin

You could potentially consider attaching it to mlDeployCertificateTemplates, but a separate task would be useful too.

grtjn avatar Sep 20 '22 18:09 grtjn

Thinking this task should be named mlDeployHostCertificateTemplates . I believe the term "Insert" was chosen to coincide with how the Manage API uses the term "insertHC" in this context, but that would be unexpected to an ml-gradle user.

rjrudin avatar Dec 19 '22 18:12 rjrudin

Being resolved via #641

rjrudin avatar Dec 20 '22 20:12 rjrudin