@@ -3059,6 +3059,7 @@ function validateContainerApp(
30593059 "instance_type" ,
30603060 "wrangler_ssh" ,
30613061 "authorized_keys" ,
3062+ "trusted_user_ca_keys" ,
30623063 "configuration" ,
30633064 "constraints" ,
30643065 "affinities" ,
@@ -3104,15 +3105,6 @@ function validateContainerApp(
31043105 `${ field } .wrangler_ssh.port must be a number between 1 and 65535 inclusive`
31053106 ) ;
31063107 }
3107-
3108- if (
3109- ! ( "authorized_keys" in containerAppOptional ) &&
3110- containerAppOptional . wrangler_ssh . enabled
3111- ) {
3112- diagnostics . errors . push (
3113- `${ field } .authorized_keys must be provided if wrangler ssh is enabled`
3114- ) ;
3115- }
31163108 }
31173109
31183110 if ( "authorized_keys" in containerAppOptional ) {
@@ -3142,6 +3134,35 @@ function validateContainerApp(
31423134 }
31433135 }
31443136
3137+ if ( "trusted_user_ca_keys" in containerAppOptional ) {
3138+ if ( ! Array . isArray ( containerAppOptional . trusted_user_ca_keys ) ) {
3139+ diagnostics . errors . push (
3140+ `${ field } .trusted_user_ca_keys must be an array`
3141+ ) ;
3142+ } else {
3143+ for ( const index in containerAppOptional . trusted_user_ca_keys ) {
3144+ const fieldPath = `${ field } .trusted_user_ca_keys[${ index } ]` ;
3145+ const key = containerAppOptional . trusted_user_ca_keys [ index ] ;
3146+
3147+ if ( ! isOptionalProperty ( key , "name" , "string" ) ) {
3148+ diagnostics . errors . push ( `${ fieldPath } .name must be a string` ) ;
3149+ }
3150+
3151+ if ( ! isRequiredProperty ( key , "public_key" , "string" ) ) {
3152+ diagnostics . errors . push (
3153+ `${ fieldPath } .public_key must be a string`
3154+ ) ;
3155+ }
3156+
3157+ if ( ! key . public_key . toLowerCase ( ) . startsWith ( "ssh-ed25519" ) ) {
3158+ diagnostics . errors . push (
3159+ `${ fieldPath } .public_key is a unsupported key type. Please provide a ED25519 public key.`
3160+ ) ;
3161+ }
3162+ }
3163+ }
3164+ }
3165+
31453166 // Instance Type validation: When present, the instance type should be either (1) a string
31463167 // representing a predefined instance type or (2) an object that optionally defines vcpu,
31473168 // memory, and disk.
0 commit comments