mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Begin service token v3
This commit is contained in:
28
backend/src/models/serviceTokenV3.ts
Normal file
28
backend/src/models/serviceTokenV3.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Document, Schema, Types, model } from "mongoose";
|
||||
|
||||
export interface IServiceTokenV3 extends Document {
|
||||
_id: Types.ObjectId;
|
||||
name: string;
|
||||
workspace: Types.ObjectId;
|
||||
publicKey: string;
|
||||
}
|
||||
|
||||
const serviceTokenV3Schema = new Schema(
|
||||
{
|
||||
name: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
workspace: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: "Workspace",
|
||||
required: true
|
||||
},
|
||||
publicKey: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
export const ServiceTokenV3 = model<IServiceTokenV3>("ServiceTokenV3", serviceTokenV3Schema);
|
||||
@@ -1,7 +1,11 @@
|
||||
import { ServiceTokenSection } from "../ServiceTokenSection";
|
||||
import { ServiceTokenV3Section } from "../ServiceTokenV3Section";
|
||||
|
||||
export const ProjectServiceTokensTab = () => {
|
||||
return (
|
||||
<ServiceTokenSection />
|
||||
<>
|
||||
<ServiceTokenV3Section />
|
||||
<ServiceTokenSection />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export const AddServiceTokenV3Modal = () => {
|
||||
return (
|
||||
<div>
|
||||
AddServiceTokenV3Modal
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { AddServiceTokenV3Modal } from "./AddServiceTokenV3Modal";
|
||||
import { ServiceTokenV3Table } from "./ServiceTokenV3Table";
|
||||
|
||||
export const ServiceTokenV3Section = () => {
|
||||
return (
|
||||
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||
<p className="text-xl font-semibold text-mineshaft-100">
|
||||
Service Tokens 2.0
|
||||
</p>
|
||||
<ServiceTokenV3Table />
|
||||
<AddServiceTokenV3Modal />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export const ServiceTokenV3Table = () => {
|
||||
return (
|
||||
<div>
|
||||
ServiceTokenV3Table
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export { ServiceTokenV3Section } from "./ServiceTokenV3Section";
|
||||
Reference in New Issue
Block a user