openvidu-deployment: Azure & GCP - certificate handling to accept base64 encoded certificates directly

- Updated the OpenVidu deployment scripts for GCP and Azure to eliminate the need for downloading and converting certificate files.
- Modified variable descriptions to specify that public and private certificates should be provided in base64 format.
- Adjusted the installation scripts to use the provided base64 encoded certificates directly for both OpenVidu and TURN server configurations.
master
cruizba 2025-12-23 22:11:16 +01:00
parent bcad387fe4
commit 5ba3e912c9
20 changed files with 120 additions and 197 deletions

View File

@ -19,19 +19,19 @@ param publicIpAddressObject object
@description('Domain name for the OpenVidu Deployment. Blank will generate default domain') @description('Domain name for the OpenVidu Deployment. Blank will generate default domain')
param domainName string = '' param domainName string = ''
@description('If certificate type is \'owncert\', this parameter will be used to specify the public certificate') @description('If certificate type is \'owncert\', this parameter will be used to specify the public certificate in base64 format')
param ownPublicCertificate string = '' param ownPublicCertificate string = ''
@description('If certificate type is \'owncert\', this parameter will be used to specify the private certificate') @description('If certificate type is \'owncert\', this parameter will be used to specify the private certificate in base64 format')
param ownPrivateCertificate string = '' param ownPrivateCertificate string = ''
@description('(Optional) Domain name for the TURN server with TLS. Only needed if your users are behind restrictive firewalls') @description('(Optional) Domain name for the TURN server with TLS. Only needed if your users are behind restrictive firewalls')
param turnDomainName string = '' param turnDomainName string = ''
@description('(Optional) This setting is applicable if the certificate type is set to \'owncert\' and the TurnDomainName is specified.') @description('(Optional) This setting is applicable if the certificate type is set to \'owncert\' and the TurnDomainName is specified. Provide in base64 format.')
param turnOwnPublicCertificate string = '' param turnOwnPublicCertificate string = ''
@description('(Optional) This setting is applicable if the certificate type is set to \'owncert\' and the TurnDomainName is specified.') @description('(Optional) This setting is applicable if the certificate type is set to \'owncert\' and the TurnDomainName is specified. Provide in base64 format.')
param turnOwnPrivateCertificate string = '' param turnOwnPrivateCertificate string = ''
@description('Initial password for the \'admin\' user in OpenVidu Meet. If not provided, a random password will be generated.') @description('Initial password for the \'admin\' user in OpenVidu Meet. If not provided, a random password will be generated.')
@ -295,14 +295,9 @@ elif [[ "${certificateType}" == "letsencrypt" ]]; then
"--certificate-type=letsencrypt" "--certificate-type=letsencrypt"
) )
else else
# Download owncert files # Use base64 encoded certificates directly
mkdir -p /tmp/owncert OWN_CERT_CRT=${ownPublicCertificate}
wget -O /tmp/owncert/fullchain.pem ${ownPublicCertificate} OWN_CERT_KEY=${ownPrivateCertificate}
wget -O /tmp/owncert/privkey.pem ${ownPrivateCertificate}
# Convert to base64
OWN_CERT_CRT=$(base64 -w 0 /tmp/owncert/fullchain.pem)
OWN_CERT_KEY=$(base64 -w 0 /tmp/owncert/privkey.pem)
CERT_ARGS=( CERT_ARGS=(
"--certificate-type=owncert" "--certificate-type=owncert"
@ -312,14 +307,9 @@ else
# Turn with TLS and own certificate # Turn with TLS and own certificate
if [[ "${turnDomainName}" != '' ]]; then if [[ "${turnDomainName}" != '' ]]; then
# Download owncert files # Use base64 encoded certificates directly
mkdir -p /tmp/owncert-turn OWN_CERT_CRT_TURN=${turnOwnPublicCertificate}
wget -O /tmp/owncert-turn/fullchain.pem ${turnOwnPublicCertificate} OWN_CERT_KEY_TURN=${turnOwnPrivateCertificate}
wget -O /tmp/owncert-turn/privkey.pem ${turnOwnPrivateCertificate}
# Convert to base64
OWN_CERT_CRT_TURN=$(base64 -w 0 /tmp/owncert-turn/fullchain.pem)
OWN_CERT_KEY_TURN=$(base64 -w 0 /tmp/owncert-turn/privkey.pem)
CERT_ARGS+=( CERT_ARGS+=(
"--turn-owncert-private-key=$OWN_CERT_KEY_TURN" "--turn-owncert-private-key=$OWN_CERT_KEY_TURN"

File diff suppressed because one or more lines are too long

View File

@ -113,7 +113,7 @@
"name": "ownPublicCertificate", "name": "ownPublicCertificate",
"type": "Microsoft.Common.TextBox", "type": "Microsoft.Common.TextBox",
"label": "Own Public Certificate", "label": "Own Public Certificate",
"subLabel": "\nIf certificate type is 'owncert', this parameter will be used to specify the public certificate", "subLabel": "\nIf certificate type is 'owncert', this parameter will be used to specify the public certificate in base64 format",
"defaultValue": "", "defaultValue": "",
"toolTip": "", "toolTip": "",
"constraints": { "constraints": {
@ -134,7 +134,7 @@
"name": "ownPrivateCertificate", "name": "ownPrivateCertificate",
"type": "Microsoft.Common.TextBox", "type": "Microsoft.Common.TextBox",
"label": "Own Private Certificate", "label": "Own Private Certificate",
"subLabel": "\nIf certificate type is 'owncert', this parameter will be used to specify the private certificate", "subLabel": "\nIf certificate type is 'owncert', this parameter will be used to specify the private certificate in base64 format",
"defaultValue": "", "defaultValue": "",
"toolTip": "", "toolTip": "",
"constraints": { "constraints": {
@ -356,7 +356,7 @@
"name": "turnOwnPublicCertificate", "name": "turnOwnPublicCertificate",
"type": "Microsoft.Common.TextBox", "type": "Microsoft.Common.TextBox",
"label": "Turn Own Public Certificate", "label": "Turn Own Public Certificate",
"subLabel": "\n(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified.", "subLabel": "\n(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. Provide in base64 format.",
"defaultValue": "", "defaultValue": "",
"toolTip": "", "toolTip": "",
"constraints": { "constraints": {
@ -377,7 +377,7 @@
"name": "turnOwnPrivateCertificate", "name": "turnOwnPrivateCertificate",
"type": "Microsoft.Common.TextBox", "type": "Microsoft.Common.TextBox",
"label": "Turn Own Private Certificate", "label": "Turn Own Private Certificate",
"subLabel": "\n(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified.", "subLabel": "\n(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. Provide in base64 format.",
"defaultValue": "", "defaultValue": "",
"toolTip": "", "toolTip": "",
"constraints": { "constraints": {

View File

@ -278,14 +278,9 @@ elif [[ "${var.certificateType}" == "letsencrypt" ]]; then
"--certificate-type=letsencrypt" "--certificate-type=letsencrypt"
) )
else else
# Download owncert files # Use base64 encoded certificates directly
mkdir -p /tmp/owncert OWN_CERT_CRT=${var.ownPublicCertificate}
wget -O /tmp/owncert/fullchain.pem ${var.ownPublicCertificate} OWN_CERT_KEY=${var.ownPrivateCertificate}
wget -O /tmp/owncert/privkey.pem ${var.ownPrivateCertificate}
# Convert to base64
OWN_CERT_CRT=$(base64 -w 0 /tmp/owncert/fullchain.pem)
OWN_CERT_KEY=$(base64 -w 0 /tmp/owncert/privkey.pem)
CERT_ARGS=( CERT_ARGS=(
"--certificate-type=owncert" "--certificate-type=owncert"
"--owncert-public-key=$OWN_CERT_CRT" "--owncert-public-key=$OWN_CERT_CRT"
@ -294,13 +289,9 @@ else
# Turn with TLS and own certificate # Turn with TLS and own certificate
if [[ "${var.turnDomainName}" != '' ]]; then if [[ "${var.turnDomainName}" != '' ]]; then
# Download owncert files # Use base64 encoded certificates directly
mkdir -p /tmp/owncert-turn OWN_CERT_CRT_TURN=${var.turnOwnPublicCertificate}
wget -O /tmp/owncert-turn/fullchain.pem ${var.turnOwnPublicCertificate} OWN_CERT_KEY_TURN=${var.turnOwnPrivateCertificate}
wget -O /tmp/owncert-turn/privkey.pem ${var.turnOwnPrivateCertificate}
# Convert to base64
OWN_CERT_CRT_TURN=$(base64 -w 0 /tmp/owncert-turn/fullchain.pem)
OWN_CERT_KEY_TURN=$(base64 -w 0 /tmp/owncert-turn/privkey.pem)
CERT_ARGS+=( CERT_ARGS+=(
"--turn-owncert-private-key=$OWN_CERT_KEY_TURN" "--turn-owncert-private-key=$OWN_CERT_KEY_TURN"
"--turn-owncert-public-key=$OWN_CERT_CRT_TURN" "--turn-owncert-public-key=$OWN_CERT_CRT_TURN"

View File

@ -54,13 +54,13 @@ variable "domainName" {
} }
variable "ownPublicCertificate" { variable "ownPublicCertificate" {
description = "If certificate type is 'owncert', this parameter will be used to specify the public certificate" description = "If certificate type is 'owncert', this parameter will be used to specify the public certificate in base64 format"
type = string type = string
default = "" default = ""
} }
variable "ownPrivateCertificate" { variable "ownPrivateCertificate" {
description = "If certificate type is 'owncert', this parameter will be used to specify the private certificate" description = "If certificate type is 'owncert', this parameter will be used to specify the private certificate in base64 format"
type = string type = string
default = "" default = ""
} }
@ -114,13 +114,13 @@ variable "turnDomainName" {
} }
variable "turnOwnPublicCertificate" { variable "turnOwnPublicCertificate" {
description = "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified." description = "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. Provide in base64 format."
type = string type = string
default = "" default = ""
} }
variable "turnOwnPrivateCertificate" { variable "turnOwnPrivateCertificate" {
description = "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified." description = "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. Provide in base64 format."
type = string type = string
default = "" default = ""
} }

View File

@ -19,19 +19,19 @@ param publicIpAddressObject object
@description('Domain name for the OpenVidu Deployment. Blank will generate default domain') @description('Domain name for the OpenVidu Deployment. Blank will generate default domain')
param domainName string = '' param domainName string = ''
@description('If certificate type is \'owncert\', this parameter will be used to specify the public certificate') @description('If certificate type is \'owncert\', this parameter will be used to specify the public certificate in base64 format')
param ownPublicCertificate string = '' param ownPublicCertificate string = ''
@description('If certificate type is \'owncert\', this parameter will be used to specify the private certificate') @description('If certificate type is \'owncert\', this parameter will be used to specify the private certificate in base64 format')
param ownPrivateCertificate string = '' param ownPrivateCertificate string = ''
@description('(Optional) Domain name for the TURN server with TLS. Only needed if your users are behind restrictive firewalls') @description('(Optional) Domain name for the TURN server with TLS. Only needed if your users are behind restrictive firewalls')
param turnDomainName string = '' param turnDomainName string = ''
@description('(Optional) This setting is applicable if the certificate type is set to \'owncert\' and the TurnDomainName is specified.') @description('(Optional) This setting is applicable if the certificate type is set to \'owncert\' and the TurnDomainName is specified. Provide in base64 format.')
param turnOwnPublicCertificate string = '' param turnOwnPublicCertificate string = ''
@description('(Optional) This setting is applicable if the certificate type is set to \'owncert\' and the TurnDomainName is specified.') @description('(Optional) This setting is applicable if the certificate type is set to \'owncert\' and the TurnDomainName is specified. Provide in base64 format.')
param turnOwnPrivateCertificate string = '' param turnOwnPrivateCertificate string = ''
@description('Visit https://openvidu.io/account') @description('Visit https://openvidu.io/account')
@ -384,14 +384,9 @@ elif [[ "${certificateType}" == "letsencrypt" ]]; then
"--certificate-type=letsencrypt" "--certificate-type=letsencrypt"
) )
else else
# Download owncert files # Use base64 encoded certificates directly
mkdir -p /tmp/owncert OWN_CERT_CRT=${ownPublicCertificate}
wget -O /tmp/owncert/fullchain.pem ${ownPublicCertificate} OWN_CERT_KEY=${ownPrivateCertificate}
wget -O /tmp/owncert/privkey.pem ${ownPrivateCertificate}
# Convert to base64
OWN_CERT_CRT=$(base64 -w 0 /tmp/owncert/fullchain.pem)
OWN_CERT_KEY=$(base64 -w 0 /tmp/owncert/privkey.pem)
CERT_ARGS=( CERT_ARGS=(
"--certificate-type=owncert" "--certificate-type=owncert"
@ -401,14 +396,9 @@ else
# Turn with TLS and own certificate # Turn with TLS and own certificate
if [[ "${turnDomainName}" != '' ]]; then if [[ "${turnDomainName}" != '' ]]; then
# Download owncert files # Use base64 encoded certificates directly
mkdir -p /tmp/owncert-turn OWN_CERT_CRT_TURN=${turnOwnPublicCertificate}
wget -O /tmp/owncert-turn/fullchain.pem ${turnOwnPublicCertificate} OWN_CERT_KEY_TURN=${turnOwnPrivateCertificate}
wget -O /tmp/owncert-turn/privkey.pem ${turnOwnPrivateCertificate}
# Convert to base64
OWN_CERT_CRT_TURN=$(base64 -w 0 /tmp/owncert-turn/fullchain.pem)
OWN_CERT_KEY_TURN=$(base64 -w 0 /tmp/owncert-turn/privkey.pem)
CERT_ARGS+=( CERT_ARGS+=(
"--turn-owncert-private-key=$OWN_CERT_KEY_TURN" "--turn-owncert-private-key=$OWN_CERT_KEY_TURN"

File diff suppressed because one or more lines are too long

View File

@ -114,7 +114,7 @@
"name": "ownPublicCertificate", "name": "ownPublicCertificate",
"type": "Microsoft.Common.TextBox", "type": "Microsoft.Common.TextBox",
"label": "Own Public Certificate", "label": "Own Public Certificate",
"subLabel": "If certificate type is 'owncert', this parameter will be used to specify the public certificate", "subLabel": "If certificate type is 'owncert', this parameter will be used to specify the public certificate in base64 format",
"defaultValue": "", "defaultValue": "",
"toolTip": "", "toolTip": "",
"constraints": { "constraints": {
@ -135,7 +135,7 @@
"name": "ownPrivateCertificate", "name": "ownPrivateCertificate",
"type": "Microsoft.Common.TextBox", "type": "Microsoft.Common.TextBox",
"label": "Own Private Certificate", "label": "Own Private Certificate",
"subLabel": "If certificate type is 'owncert', this parameter will be used to specify the private certificate", "subLabel": "If certificate type is 'owncert', this parameter will be used to specify the private certificate in base64 format",
"defaultValue": "", "defaultValue": "",
"toolTip": "", "toolTip": "",
"constraints": { "constraints": {
@ -530,7 +530,7 @@
"name": "turnOwnPublicCertificate", "name": "turnOwnPublicCertificate",
"type": "Microsoft.Common.TextBox", "type": "Microsoft.Common.TextBox",
"label": "Turn Own Public Certificate", "label": "Turn Own Public Certificate",
"subLabel": "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified.", "subLabel": "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. Provide in base64 format.",
"defaultValue": "", "defaultValue": "",
"toolTip": "", "toolTip": "",
"constraints": { "constraints": {
@ -551,7 +551,7 @@
"name": "turnOwnPrivateCertificate", "name": "turnOwnPrivateCertificate",
"type": "Microsoft.Common.TextBox", "type": "Microsoft.Common.TextBox",
"label": "Turn Own Private Certificate", "label": "Turn Own Private Certificate",
"subLabel": "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified.", "subLabel": "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. Provide in base64 format.",
"defaultValue": "", "defaultValue": "",
"toolTip": "", "toolTip": "",
"constraints": { "constraints": {

View File

@ -761,14 +761,9 @@ elif [[ "${var.certificateType}" == "letsencrypt" ]]; then
"--certificate-type=letsencrypt" "--certificate-type=letsencrypt"
) )
else else
# Download owncert files # Use base64 encoded certificates directly
mkdir -p /tmp/owncert OWN_CERT_CRT=${var.ownPublicCertificate}
wget -O /tmp/owncert/fullchain.pem ${var.ownPublicCertificate} OWN_CERT_KEY=${var.ownPrivateCertificate}
wget -O /tmp/owncert/privkey.pem ${var.ownPrivateCertificate}
# Convert to base64
OWN_CERT_CRT=$(base64 -w 0 /tmp/owncert/fullchain.pem)
OWN_CERT_KEY=$(base64 -w 0 /tmp/owncert/privkey.pem)
CERT_ARGS=( CERT_ARGS=(
"--certificate-type=owncert" "--certificate-type=owncert"
"--owncert-public-key=$OWN_CERT_CRT" "--owncert-public-key=$OWN_CERT_CRT"
@ -777,13 +772,9 @@ else
# Turn with TLS and own certificate # Turn with TLS and own certificate
if [[ "${var.turnDomainName}" != '' ]]; then if [[ "${var.turnDomainName}" != '' ]]; then
# Download owncert files # Use base64 encoded certificates directly
mkdir -p /tmp/owncert-turn OWN_CERT_CRT_TURN=${var.turnOwnPublicCertificate}
wget -O /tmp/owncert-turn/fullchain.pem ${var.turnOwnPublicCertificate} OWN_CERT_KEY_TURN=${var.turnOwnPrivateCertificate}
wget -O /tmp/owncert-turn/privkey.pem ${var.turnOwnPrivateCertificate}
# Convert to base64
OWN_CERT_CRT_TURN=$(base64 -w 0 /tmp/owncert-turn/fullchain.pem)
OWN_CERT_KEY_TURN=$(base64 -w 0 /tmp/owncert-turn/privkey.pem)
CERT_ARGS+=( CERT_ARGS+=(
"--turn-owncert-private-key=$OWN_CERT_KEY_TURN" "--turn-owncert-private-key=$OWN_CERT_KEY_TURN"
"--turn-owncert-public-key=$OWN_CERT_CRT_TURN" "--turn-owncert-public-key=$OWN_CERT_CRT_TURN"

View File

@ -54,13 +54,13 @@ variable "domainName" {
} }
variable "ownPublicCertificate" { variable "ownPublicCertificate" {
description = "If certificate type is 'owncert', this parameter will be used to specify the public certificate" description = "If certificate type is 'owncert', this parameter will be used to specify the public certificate in base64 format"
type = string type = string
default = "" default = ""
} }
variable "ownPrivateCertificate" { variable "ownPrivateCertificate" {
description = "If certificate type is 'owncert', this parameter will be used to specify the private certificate" description = "If certificate type is 'owncert', this parameter will be used to specify the private certificate in base64 format"
type = string type = string
default = "" default = ""
} }
@ -160,13 +160,13 @@ variable "turnDomainName" {
} }
variable "turnOwnPublicCertificate" { variable "turnOwnPublicCertificate" {
description = "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified." description = "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. Provide in base64 format."
type = string type = string
default = "" default = ""
} }
variable "turnOwnPrivateCertificate" { variable "turnOwnPrivateCertificate" {
description = "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified." description = "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. Provide in base64 format."
type = string type = string
default = "" default = ""
} }

View File

@ -16,10 +16,10 @@ param certificateType string = 'letsencrypt'
@description('Domain name for the OpenVidu Deployment.') @description('Domain name for the OpenVidu Deployment.')
param domainName string = '' param domainName string = ''
@description('If certificate type is \'owncert\', this parameter will be used to specify the public certificate') @description('If certificate type is \'owncert\', this parameter will be used to specify the public certificate in base64 format')
param ownPublicCertificate string = '' param ownPublicCertificate string = ''
@description('If certificate type is \'owncert\', this parameter will be used to specify the private certificate') @description('If certificate type is \'owncert\', this parameter will be used to specify the private certificate in base64 format')
param ownPrivateCertificate string = '' param ownPrivateCertificate string = ''
@description('Name of the PublicIPAddress resource in Azure when using certificateType \'owncert\' or \'letsencrypt\'') @description('Name of the PublicIPAddress resource in Azure when using certificateType \'owncert\' or \'letsencrypt\'')
@ -28,10 +28,10 @@ param publicIpAddressObject object
@description('(Optional) Domain name for the TURN server with TLS. Only needed if your users are behind restrictive firewalls') @description('(Optional) Domain name for the TURN server with TLS. Only needed if your users are behind restrictive firewalls')
param turnDomainName string = '' param turnDomainName string = ''
@description('(Optional) This setting is applicable if the certificate type is set to \'owncert\' and the TurnDomainName is specified.') @description('(Optional) This setting is applicable if the certificate type is set to \'owncert\' and the TurnDomainName is specified. Provide in base64 format.')
param turnOwnPublicCertificate string = '' param turnOwnPublicCertificate string = ''
@description('(Optional) This setting is applicable if the certificate type is set to \'owncert\' and the TurnDomainName is specified.') @description('(Optional) This setting is applicable if the certificate type is set to \'owncert\' and the TurnDomainName is specified. Provide in base64 format.')
param turnOwnPrivateCertificate string = '' param turnOwnPrivateCertificate string = ''
@description('Visit https://openvidu.io/account') @description('Visit https://openvidu.io/account')
@ -521,14 +521,9 @@ elif [[ "${certificateType}" == "letsencrypt" ]]; then
"--certificate-type=letsencrypt" "--certificate-type=letsencrypt"
) )
else else
# Download owncert files # Use base64 encoded certificates directly
mkdir -p /tmp/owncert OWN_CERT_CRT=${ownPublicCertificate}
wget -O /tmp/owncert/fullchain.pem ${ownPublicCertificate} OWN_CERT_KEY=${ownPrivateCertificate}
wget -O /tmp/owncert/privkey.pem ${ownPrivateCertificate}
# Convert to base64
OWN_CERT_CRT=$(base64 -w 0 /tmp/owncert/fullchain.pem)
OWN_CERT_KEY=$(base64 -w 0 /tmp/owncert/privkey.pem)
CERT_ARGS=( CERT_ARGS=(
"--certificate-type=owncert" "--certificate-type=owncert"
@ -538,14 +533,9 @@ else
# Turn with TLS and own certificate # Turn with TLS and own certificate
if [[ "${turnDomainName}" != '' ]]; then if [[ "${turnDomainName}" != '' ]]; then
# Download owncert files # Use base64 encoded certificates directly
mkdir -p /tmp/owncert-turn OWN_CERT_CRT_TURN=${turnOwnPublicCertificate}
wget -O /tmp/owncert-turn/fullchain.pem ${turnOwnPublicCertificate} OWN_CERT_KEY_TURN=${turnOwnPrivateCertificate}
wget -O /tmp/owncert-turn/privkey.pem ${turnOwnPrivateCertificate}
# Convert to base64
OWN_CERT_CRT_TURN=$(base64 -w 0 /tmp/owncert-turn/fullchain.pem)
OWN_CERT_KEY_TURN=$(base64 -w 0 /tmp/owncert-turn/privkey.pem)
CERT_ARGS+=( CERT_ARGS+=(
"--turn-owncert-private-key=$OWN_CERT_KEY_TURN" "--turn-owncert-private-key=$OWN_CERT_KEY_TURN"

File diff suppressed because one or more lines are too long

View File

@ -114,7 +114,7 @@
"name": "ownPublicCertificate", "name": "ownPublicCertificate",
"type": "Microsoft.Common.TextBox", "type": "Microsoft.Common.TextBox",
"label": "Own Public Certificate", "label": "Own Public Certificate",
"subLabel": "If certificate type is 'owncert', this parameter will be used to specify the public certificate", "subLabel": "If certificate type is 'owncert', this parameter will be used to specify the public certificate in base64 format",
"defaultValue": "", "defaultValue": "",
"toolTip": "", "toolTip": "",
"constraints": { "constraints": {
@ -135,7 +135,7 @@
"name": "ownPrivateCertificate", "name": "ownPrivateCertificate",
"type": "Microsoft.Common.TextBox", "type": "Microsoft.Common.TextBox",
"label": "Own Private Certificate", "label": "Own Private Certificate",
"subLabel": "If certificate type is 'owncert', this parameter will be used to specify the private certificate", "subLabel": "If certificate type is 'owncert', this parameter will be used to specify the private certificate in base64 format",
"defaultValue": "", "defaultValue": "",
"toolTip": "", "toolTip": "",
"constraints": { "constraints": {
@ -545,7 +545,7 @@
"name": "turnOwnPublicCertificate", "name": "turnOwnPublicCertificate",
"type": "Microsoft.Common.TextBox", "type": "Microsoft.Common.TextBox",
"label": "Turn Own Public Certificate", "label": "Turn Own Public Certificate",
"subLabel": "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified.", "subLabel": "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. Provide in base64 format.",
"defaultValue": "", "defaultValue": "",
"toolTip": "", "toolTip": "",
"constraints": { "constraints": {
@ -566,7 +566,7 @@
"name": "turnOwnPrivateCertificate", "name": "turnOwnPrivateCertificate",
"type": "Microsoft.Common.TextBox", "type": "Microsoft.Common.TextBox",
"label": "Turn Own Private Certificate", "label": "Turn Own Private Certificate",
"subLabel": "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified.", "subLabel": "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. Provide in base64 format.",
"defaultValue": "", "defaultValue": "",
"toolTip": "", "toolTip": "",
"constraints": { "constraints": {

View File

@ -1146,14 +1146,9 @@ elif [[ "${var.certificateType}" == "letsencrypt" ]]; then
"--certificate-type=letsencrypt" "--certificate-type=letsencrypt"
) )
else else
# Download owncert files # Use base64 encoded certificates directly
mkdir -p /tmp/owncert OWN_CERT_CRT=${var.ownPublicCertificate}
wget -O /tmp/owncert/fullchain.pem ${var.ownPublicCertificate} OWN_CERT_KEY=${var.ownPrivateCertificate}
wget -O /tmp/owncert/privkey.pem ${var.ownPrivateCertificate}
# Convert to base64
OWN_CERT_CRT=$(base64 -w 0 /tmp/owncert/fullchain.pem)
OWN_CERT_KEY=$(base64 -w 0 /tmp/owncert/privkey.pem)
CERT_ARGS=( CERT_ARGS=(
"--certificate-type=owncert" "--certificate-type=owncert"
@ -1163,14 +1158,9 @@ else
# Turn with TLS and own certificate # Turn with TLS and own certificate
if [[ "${var.turnDomainName}" != '' ]]; then if [[ "${var.turnDomainName}" != '' ]]; then
# Download owncert files # Use base64 encoded certificates directly
mkdir -p /tmp/owncert-turn OWN_CERT_CRT_TURN=${var.turnOwnPublicCertificate}
wget -O /tmp/owncert-turn/fullchain.pem ${var.turnOwnPublicCertificate} OWN_CERT_KEY_TURN=${var.turnOwnPrivateCertificate}
wget -O /tmp/owncert-turn/privkey.pem ${var.turnOwnPrivateCertificate}
# Convert to base64
OWN_CERT_CRT_TURN=$(base64 -w 0 /tmp/owncert-turn/fullchain.pem)
OWN_CERT_KEY_TURN=$(base64 -w 0 /tmp/owncert-turn/privkey.pem)
CERT_ARGS+=( CERT_ARGS+=(
"--turn-owncert-private-key=$OWN_CERT_KEY_TURN" "--turn-owncert-private-key=$OWN_CERT_KEY_TURN"

View File

@ -54,13 +54,13 @@ variable "domainName" {
} }
variable "ownPublicCertificate" { variable "ownPublicCertificate" {
description = "If certificate type is 'owncert', this parameter will be used to specify the public certificate" description = "If certificate type is 'owncert', this parameter will be used to specify the public certificate in base64 format"
type = string type = string
default = "" default = ""
} }
variable "ownPrivateCertificate" { variable "ownPrivateCertificate" {
description = "If certificate type is 'owncert', this parameter will be used to specify the private certificate" description = "If certificate type is 'owncert', this parameter will be used to specify the private certificate in base64 format"
type = string type = string
default = "" default = ""
} }
@ -176,13 +176,13 @@ variable "turnDomainName" {
} }
variable "turnOwnPublicCertificate" { variable "turnOwnPublicCertificate" {
description = "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified." description = "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. Provide in base64 format."
type = string type = string
default = "" default = ""
} }
variable "turnOwnPrivateCertificate" { variable "turnOwnPrivateCertificate" {
description = "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified." description = "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. Provide in base64 format."
type = string type = string
default = "" default = ""
} }

View File

@ -19,10 +19,10 @@ param publicIpAddressObject object
@description('Domain name for the OpenVidu Deployment. Blank will generate default domain') @description('Domain name for the OpenVidu Deployment. Blank will generate default domain')
param domainName string = '' param domainName string = ''
@description('If certificate type is \'owncert\', this parameter will be used to specify the public certificate') @description('If certificate type is \'owncert\', this parameter will be used to specify the public certificate in base64 format')
param ownPublicCertificate string = '' param ownPublicCertificate string = ''
@description('If certificate type is \'owncert\', this parameter will be used to specify the private certificate') @description('If certificate type is \'owncert\', this parameter will be used to specify the private certificate in base64 format')
param ownPrivateCertificate string = '' param ownPrivateCertificate string = ''
@description('Initial password for the \'admin\' user in OpenVidu Meet. If not provided, a random password will be generated.') @description('Initial password for the \'admin\' user in OpenVidu Meet. If not provided, a random password will be generated.')
@ -36,10 +36,10 @@ param initialMeetApiKey string = ''
@description('(Optional) Domain name for the TURN server with TLS. Only needed if your users are behind restrictive firewalls') @description('(Optional) Domain name for the TURN server with TLS. Only needed if your users are behind restrictive firewalls')
param turnDomainName string = '' param turnDomainName string = ''
@description('(Optional) This setting is applicable if the certificate type is set to \'owncert\' and the TurnDomainName is specified.') @description('(Optional) This setting is applicable if the certificate type is set to \'owncert\' and the TurnDomainName is specified. Provide in base64 format.')
param turnOwnPublicCertificate string = '' param turnOwnPublicCertificate string = ''
@description('(Optional) This setting is applicable if the certificate type is set to \'owncert\' and the TurnDomainName is specified.') @description('(Optional) This setting is applicable if the certificate type is set to \'owncert\' and the TurnDomainName is specified. Provide in base64 format.')
param turnOwnPrivateCertificate string = '' param turnOwnPrivateCertificate string = ''
@description('Visit https://openvidu.io/account') @description('Visit https://openvidu.io/account')
@ -309,14 +309,9 @@ elif [[ "${certificateType}" == "letsencrypt" ]]; then
"--certificate-type=letsencrypt" "--certificate-type=letsencrypt"
) )
else else
# Download owncert files # Use base64 encoded certificates directly
mkdir -p /tmp/owncert OWN_CERT_CRT=${ownPublicCertificate}
wget -O /tmp/owncert/fullchain.pem ${ownPublicCertificate} OWN_CERT_KEY=${ownPrivateCertificate}
wget -O /tmp/owncert/privkey.pem ${ownPrivateCertificate}
# Convert to base64
OWN_CERT_CRT=$(base64 -w 0 /tmp/owncert/fullchain.pem)
OWN_CERT_KEY=$(base64 -w 0 /tmp/owncert/privkey.pem)
CERT_ARGS=( CERT_ARGS=(
"--certificate-type=owncert" "--certificate-type=owncert"
@ -326,14 +321,9 @@ else
# Turn with TLS and own certificate # Turn with TLS and own certificate
if [[ "${turnDomainName}" != '' ]]; then if [[ "${turnDomainName}" != '' ]]; then
# Download owncert files # Use base64 encoded certificates directly
mkdir -p /tmp/owncert-turn OWN_CERT_CRT_TURN=${turnOwnPublicCertificate}
wget -O /tmp/owncert-turn/fullchain.pem ${turnOwnPublicCertificate} OWN_CERT_KEY_TURN=${turnOwnPrivateCertificate}
wget -O /tmp/owncert-turn/privkey.pem ${turnOwnPrivateCertificate}
# Convert to base64
OWN_CERT_CRT_TURN=$(base64 -w 0 /tmp/owncert-turn/fullchain.pem)
OWN_CERT_KEY_TURN=$(base64 -w 0 /tmp/owncert-turn/privkey.pem)
CERT_ARGS+=( CERT_ARGS+=(
"--turn-owncert-private-key=$OWN_CERT_KEY_TURN" "--turn-owncert-private-key=$OWN_CERT_KEY_TURN"

File diff suppressed because one or more lines are too long

View File

@ -113,7 +113,7 @@
"name": "ownPublicCertificate", "name": "ownPublicCertificate",
"type": "Microsoft.Common.TextBox", "type": "Microsoft.Common.TextBox",
"label": "Own Public Certificate", "label": "Own Public Certificate",
"subLabel": "\nIf certificate type is 'owncert', this parameter will be used to specify the public certificate", "subLabel": "\nIf certificate type is 'owncert', this parameter will be used to specify the public certificate in base64 format",
"defaultValue": "", "defaultValue": "",
"toolTip": "", "toolTip": "",
"constraints": { "constraints": {
@ -134,7 +134,7 @@
"name": "ownPrivateCertificate", "name": "ownPrivateCertificate",
"type": "Microsoft.Common.TextBox", "type": "Microsoft.Common.TextBox",
"label": "Own Private Certificate", "label": "Own Private Certificate",
"subLabel": "\nIf certificate type is 'owncert', this parameter will be used to specify the private certificate", "subLabel": "\nIf certificate type is 'owncert', this parameter will be used to specify the private certificate in base64 format",
"defaultValue": "", "defaultValue": "",
"toolTip": "", "toolTip": "",
"constraints": { "constraints": {
@ -406,7 +406,7 @@
"name": "turnOwnPublicCertificate", "name": "turnOwnPublicCertificate",
"type": "Microsoft.Common.TextBox", "type": "Microsoft.Common.TextBox",
"label": "Turn Own Public Certificate", "label": "Turn Own Public Certificate",
"subLabel": "\n(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified.", "subLabel": "\n(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. Provide in base64 format.",
"defaultValue": "", "defaultValue": "",
"toolTip": "", "toolTip": "",
"constraints": { "constraints": {
@ -427,7 +427,7 @@
"name": "turnOwnPrivateCertificate", "name": "turnOwnPrivateCertificate",
"type": "Microsoft.Common.TextBox", "type": "Microsoft.Common.TextBox",
"label": "Turn Own Private Certificate", "label": "Turn Own Private Certificate",
"subLabel": "\n(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified.", "subLabel": "\n(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. Provide in base64 format.",
"defaultValue": "", "defaultValue": "",
"toolTip": "", "toolTip": "",
"constraints": { "constraints": {

View File

@ -277,14 +277,9 @@ elif [[ "${var.certificateType}" == "letsencrypt" ]]; then
"--certificate-type=letsencrypt" "--certificate-type=letsencrypt"
) )
else else
# Download owncert files # Use base64 encoded certificates directly
mkdir -p /tmp/owncert OWN_CERT_CRT=${var.ownPublicCertificate}
wget -O /tmp/owncert/fullchain.pem ${var.ownPublicCertificate} OWN_CERT_KEY=${var.ownPrivateCertificate}
wget -O /tmp/owncert/privkey.pem ${var.ownPrivateCertificate}
# Convert to base64
OWN_CERT_CRT=$(base64 -w 0 /tmp/owncert/fullchain.pem)
OWN_CERT_KEY=$(base64 -w 0 /tmp/owncert/privkey.pem)
CERT_ARGS=( CERT_ARGS=(
"--certificate-type=owncert" "--certificate-type=owncert"
"--owncert-public-key=$OWN_CERT_CRT" "--owncert-public-key=$OWN_CERT_CRT"
@ -293,13 +288,9 @@ else
# Turn with TLS and own certificate # Turn with TLS and own certificate
if [[ "${var.turnDomainName}" != '' ]]; then if [[ "${var.turnDomainName}" != '' ]]; then
# Download owncert files # Use base64 encoded certificates directly
mkdir -p /tmp/owncert-turn OWN_CERT_CRT_TURN=${var.turnOwnPublicCertificate}
wget -O /tmp/owncert-turn/fullchain.pem ${var.turnOwnPublicCertificate} OWN_CERT_KEY_TURN=${var.turnOwnPrivateCertificate}
wget -O /tmp/owncert-turn/privkey.pem ${var.turnOwnPrivateCertificate}
# Convert to base64
OWN_CERT_CRT_TURN=$(base64 -w 0 /tmp/owncert-turn/fullchain.pem)
OWN_CERT_KEY_TURN=$(base64 -w 0 /tmp/owncert-turn/privkey.pem)
CERT_ARGS+=( CERT_ARGS+=(
"--turn-owncert-private-key=$OWN_CERT_KEY_TURN" "--turn-owncert-private-key=$OWN_CERT_KEY_TURN"
"--turn-owncert-public-key=$OWN_CERT_CRT_TURN" "--turn-owncert-public-key=$OWN_CERT_CRT_TURN"

View File

@ -54,13 +54,13 @@ variable "domainName" {
} }
variable "ownPublicCertificate" { variable "ownPublicCertificate" {
description = "If certificate type is 'owncert', this parameter will be used to specify the public certificate" description = "If certificate type is 'owncert', this parameter will be used to specify the public certificate in base64 format"
type = string type = string
default = "" default = ""
} }
variable "ownPrivateCertificate" { variable "ownPrivateCertificate" {
description = "If certificate type is 'owncert', this parameter will be used to specify the private certificate" description = "If certificate type is 'owncert', this parameter will be used to specify the private certificate in base64 format"
type = string type = string
default = "" default = ""
} }
@ -130,13 +130,13 @@ variable "turnDomainName" {
} }
variable "turnOwnPublicCertificate" { variable "turnOwnPublicCertificate" {
description = "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified." description = "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. Provide in base64 format."
type = string type = string
default = "" default = ""
} }
variable "turnOwnPrivateCertificate" { variable "turnOwnPrivateCertificate" {
description = "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified." description = "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. Provide in base64 format."
type = string type = string
default = "" default = ""
} }