import Downloads from './Downloads.js'; import GetCopy from './GetCopy.js'; export default { components: { Downloads, GetCopy }, props: [ 'cluster', 'token', 'state' ], data() { return { sshSignReq: { PubKey: "", Principal: "root", Validity: "+1d", }, sshUserCert: null, }; }, methods: { sshCASign() { event.preventDefault(); fetch(`/clusters/${this.cluster.Name}/ssh/user-ca/sign`, { method: 'POST', body: JSON.stringify(this.sshSignReq), headers: { 'Authorization': 'Bearer ' + this.token, 'Content-Type': 'application/json' }, }).then((resp) => resp.blob()) .then((cert) => { this.sshUserCert = URL.createObjectURL(cert) }) .catch((e) => { alert('failed to sign: '+e); }) }, }, template: `
Name | Certificate | Signed certificates |
---|---|---|
{{ ca.Name }} |
{{" "}}
|