mirror of
https://github.com/certd/certd.git
synced 2026-07-06 20:37:34 +08:00
Compare commits
2 Commits
cc5154e04e
...
c28dfa8aca
| Author | SHA1 | Date | |
|---|---|---|---|
| c28dfa8aca | |||
| 91141922ee |
Binary file not shown.
|
After Width: | Height: | Size: 161 KiB |
@@ -26,16 +26,20 @@ Created an external account key
|
||||
[b64MacKey: xxxxxxxxxxxxxxxx
|
||||
keyId: xxxxxxxxxxxxx]
|
||||
```
|
||||

|
||||
|
||||
3. 到Certd中,创建一条EAB授权记录,填写keyId(=kid) 和 b64MacKey 信息
|
||||
注意:keyId没有`]`结尾,不要把`]`也复制了
|
||||
|
||||
注意:EAB授权使用过一次之后,会绑定邮箱,后续再次使用时,要使用相同的邮箱
|
||||
注意:EAB授权使用过一次之后,会绑定邮箱,后续再次使用时,要使用相同的邮箱,所以邮箱切记不要修改
|
||||
否则会报错 `Unknown external account binding (EAB) key. This may be due to the EAB key expiring which occurs 7 days after creation`
|
||||
|
||||
### 2.2 通过服务账号获取EAB
|
||||
4. 创建证书流水线,选择证书提供商为google,选择EAB授权,运行流水线申请证书
|
||||
|
||||
此方式可以自动EAB,需要配置代理
|
||||
|
||||
### 2.2 通过google服务账号接口获取授权
|
||||
|
||||
此方式可以自动获取EAB,需要服务端配置代理
|
||||
|
||||
1. 创建服务账号
|
||||
https://console.cloud.google.com/projectselector2/iam-admin/serviceaccounts/create?walkthrough_id=iam--create-service-account&hl=zh-cn#step_index=1
|
||||
@@ -48,9 +52,7 @@ https://console.cloud.google.com/projectselector2/iam-admin/serviceaccounts/crea
|
||||
7. 点击`添加密钥`->`创建新密钥`->`JSON`,下载密钥文件
|
||||
8. 将json文件内容粘贴到 certd中 Google服务授权输入框中
|
||||
|
||||
9. 创建证书流水线,选择证书提供商为google, 选择服务账号授权,运行流水线申请证书
|
||||
|
||||
## 3、 创建证书流水线
|
||||
选择证书提供商为google, 选择EAB授权 或 服务账号授权
|
||||
|
||||
## 4、 其他就跟正常申请证书一样了
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="origin-metadata w-100%">
|
||||
<div class="block-title">
|
||||
自定义插件参数配置
|
||||
<div class="helper">可以设置插件选项的配置,设置配置默认值、修改帮助说明、设置是否显示该字段等</div>
|
||||
<div class="helper">可以设置插件选项的配置,设置配置默认值、修改帮助说明、设置是否显示该字段等,在用户申请证书对话框里面使用你自定义设置的展示效果</div>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<div ref="formRef" class="config-form w-full" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
@@ -43,7 +43,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx">
|
||||
import { FsRender } from "@fast-crud/fast-crud";
|
||||
import { dict, FsRender } from "@fast-crud/fast-crud";
|
||||
import { cloneDeep, merge, unset } from "lodash-es";
|
||||
import { computed, onMounted, reactive, ref } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
@@ -67,6 +67,18 @@ const labelCol = ref({
|
||||
const wrapperCol = ref({ span: 16 });
|
||||
const configForm: any = reactive({});
|
||||
|
||||
const showDict = dict({
|
||||
data: [
|
||||
{
|
||||
value: true,
|
||||
label: "显示",
|
||||
},
|
||||
{
|
||||
value: false,
|
||||
label: "不显示",
|
||||
},
|
||||
],
|
||||
});
|
||||
function getScope() {
|
||||
return {
|
||||
form: configForm,
|
||||
@@ -104,12 +116,25 @@ const editableKeys = ref([
|
||||
defaultRender(item: any) {
|
||||
return () => {
|
||||
const value = item["show"];
|
||||
return value === false ? "不显示" : "显示";
|
||||
let showType = "";
|
||||
let color = "";
|
||||
if (item.mergeScript?.indexOf("show:") >= -1) {
|
||||
showType = "条件显示";
|
||||
color = "orange";
|
||||
} else {
|
||||
showType = value === false ? "不显示" : "显示";
|
||||
color = value === false ? "red" : "green";
|
||||
}
|
||||
return (
|
||||
<a-tag color={color} size="small">
|
||||
{showType}
|
||||
</a-tag>
|
||||
);
|
||||
};
|
||||
},
|
||||
editRender(item: any) {
|
||||
return () => {
|
||||
return <a-switch vModel:checked={configForm[item.key]["show"]} />;
|
||||
return <fs-dict-switch vModel:checked={configForm[item.key]["show"]} dict={showDict} />;
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { defineProps } from "vue";
|
||||
import { dict } from "@fast-crud/fast-crud";
|
||||
|
||||
const props = defineProps<{ value: any }>();
|
||||
|
||||
@@ -10,20 +10,42 @@ function setValue() {
|
||||
function clearValue() {
|
||||
emits("clear");
|
||||
}
|
||||
|
||||
const switchDict = dict({
|
||||
data: [
|
||||
{
|
||||
value: true,
|
||||
label: "自定义",
|
||||
},
|
||||
{
|
||||
value: false,
|
||||
label: "原始值",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
function onSwitchChange(value: boolean) {
|
||||
if (value) {
|
||||
setValue();
|
||||
} else {
|
||||
clearValue();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="rollbackable">
|
||||
<div class="flex">
|
||||
<div style="width: 100px">
|
||||
<a-tag v-if="value === undefined" color="green" size="small" class="pointer flex-inline items-center" @click.stop="setValue">
|
||||
<!-- <a-tag v-if="value === undefined" color="green" size="small" class="pointer flex-inline items-center" @click.stop="setValue">
|
||||
<fs-icon icon="material-symbols:edit" class="mr-5"></fs-icon>
|
||||
自定义
|
||||
</a-tag>
|
||||
<a-tag v-else color="red" size="small" class="pointer flex-inline items-center" @click.stop="clearValue">
|
||||
<fs-icon icon="material-symbols:undo" class="mr-5"></fs-icon>
|
||||
还原
|
||||
</a-tag>
|
||||
</a-tag> -->
|
||||
<fs-dict-switch :checked="value !== undefined" :dict="switchDict" @change="onSwitchChange" />
|
||||
</div>
|
||||
<div class="flex-1 overflow-hidden value-render">
|
||||
<slot v-if="value === undefined" name="default"></slot>
|
||||
|
||||
Reference in New Issue
Block a user