</div>
</div>
- <div *ngIf="configForm.getValue('auth_method') === 'agent'">
- <div class="form-group row">
- <label class="cd-col-form-label required"
- for="role"
- i18n>Role
- </label>
- <div class="cd-col-form-input">
- <input id="role"
- name="role"
- class="form-control"
- formControlName="role">
- <span class="invalid-feedback"
- *ngIf="configForm.showError('role', frm, 'required')"
- i18n>This field is required.</span>
- </div>
- </div>
- </div>
-
<div *ngIf="configForm.getValue('encryptionType') === 'aws:kms' || configForm.getValue('encryptionType') === 'AES256'">
<div class="form-group row">
<label class="cd-col-form-label"
ssl_cert: [null, CdValidators.sslCert()],
client_cert: [null, CdValidators.pemCert()],
client_key: [null, CdValidators.sslPrivKey()],
- role: [
- null,
- [
- CdValidators.requiredIf({
- auth_method: 'agent'
- })
- ]
- ],
kmsEnabled: [{ value: false }],
s3Enabled: [{ value: false }]
});
kms_vault_token: str = CephService.send_command('mon', 'config get',
who=name_to_config_section(full_daemon_name), # noqa E501 #pylint: disable=line-too-long
key='rgw_crypt_vault_token_file') # noqa E501 #pylint: disable=line-too-long
- if (
- kms_vault_auth.strip() != ""
- and kms_vault_engine.strip() != ""
- and kms_vault_address.strip() != ""
- and kms_vault_token.strip() != ""
- ):
- kms_vault_configured = True
+ if (kms_vault_auth.strip() != "" and kms_vault_engine.strip() != "" and kms_vault_address.strip() != ""): # noqa E501 #pylint: disable=line-too-long
+ if(kms_vault_auth == 'token' and kms_vault_token.strip() == ""):
+ kms_vault_configured = False
+ else:
+ kms_vault_configured = True
if sse_s3_backend.strip() == 'vault':
s3_vault_auth: str = CephService.send_command('mon', 'config get',
s3_vault_token: str = CephService.send_command('mon', 'config get',
who=name_to_config_section(full_daemon_name), # noqa E501 #pylint: disable=line-too-long
key='rgw_crypt_sse_s3_vault_token_file') # noqa E501 #pylint: disable=line-too-long
- if (
- s3_vault_auth.strip() != ""
- and s3_vault_engine.strip() != ""
- and s3_vault_address.strip() != ""
- and s3_vault_token.strip() != ""
- ):
- s3_vault_configured = True
+
+ if (s3_vault_auth.strip() != "" and s3_vault_engine.strip() != "" and s3_vault_address.strip() != ""): # noqa E501 #pylint: disable=line-too-long
+ if(s3_vault_auth == 'token' and s3_vault_token.strip() == ""):
+ s3_vault_configured = False
+ else:
+ s3_vault_configured = True
vault_stats.append(kms_vault_configured)
vault_stats.append(s3_vault_configured)