cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extension Creation problem

ArneV
Guide

Im trying to setup my environment to create a SQL Extension.

However i get 2 errors, i guess the first part is due to the second part.

The environment is using a self signd certificate, but how can i skip the validation?

Do i have to somehow mark it localy as a trusted? (Just guessing)

 

ArneV_0-1758869739526.png

Regards

Arne

 

6 REPLIES 6

lubrman
Advisor

Hi @ArneV 

Is it an extension from the Hub or a custom extension for SQL?

ArneV
Guide

I'm trying to write my own custom SQL extension.

tomaxp
Mentor

Hi,
you can't skip validation. With self-signed certificates, you need to:

Add the certificate to the Credential Vault

Dynatrace → Manage→  Credential vault → Ann new credential 
then Credential type: Public certyficate to extension validation

Upload the CA (root or intermediate) or the self-signed cert in PEM format.

Sign the extension package and create the bundle
Dynatrace only accepts signed extensions. For example:

# 1) Package the extension
zip -r extension.zip extension/

# 2) Sign it with your cert and private key
openssl cms -sign \
  -signer ../../dynatrace.crt \
  -inkey ../../dynatrace.key \
  -binary -in extension.zip \
  -outform PEM -out extension.zip.sig

# 3) Bundle both files
zip -r bundle.zip extension.zip extension.zip.sig


Then upload bundle.zip under Extensions

ArneV
Guide

Sorry i might be slightly confused. When i watch the DT video and follow the guide ( https://www.youtube.com/watch?v=Qy4Ge8HIzEk) They just enter the URL. When i do this for my production environment it works fine. When i do it for my test environment, it does not work.

So it seems it's not in VSCode where i added the path to my keys / certificates that is the issue.

However it seems more to be an issue with VSCode (DT Extension) That will not accept a Self signed certificate when connecting to the environment.

Prod asks for the API key (As expected)

Test still says 

ArneV_0-1759137073037.png

I can try to use your description. However i cannot initialize workspace. For that i "must" use a environment.

lubrman
Advisor

Hi @ArneV 

So you’re using the VS Code Dynatrace extension. The issue is most likely that you don’t have the correct certificate generated for this environment. When you switch between environments within the extension, you also need to add the key and the URL go through the entire setup process again. That should resolve your problem. As it stands, it looks like you’re trying to use a production certificate in the test environment.

lubrman_0-1759142317784.png

 

ArneV
Guide

But this is the problem. i cannot add a environment.

It's when i try to add i get the certificate error, it is as if the VSCode / DT Plugin will not accept an environment with a self signed certificate. 

Featured Posts