mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 20:25:43 +00:00
Clean up and weave crypto into service account permissions
This commit is contained in:
@@ -1,22 +1,13 @@
|
||||
import SecurityClient from '@app/components/utilities/SecurityClient';
|
||||
import { apiRequest } from '@app/config/request';
|
||||
|
||||
/**
|
||||
* Get the latest key pairs from a certain workspace
|
||||
* @param {string} workspaceId
|
||||
* @returns
|
||||
*/
|
||||
const getLatestFileKey = ({ workspaceId }: { workspaceId: string }) =>
|
||||
SecurityClient.fetchCall(`/api/v1/key/${workspaceId}/latest`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
}).then(async (res) => {
|
||||
if (res?.status === 200) {
|
||||
return res.json();
|
||||
}
|
||||
console.log('Failed to get the latest key pairs for a certain project');
|
||||
return undefined;
|
||||
});
|
||||
const getLatestFileKey = async ({ workspaceId }: { workspaceId: string }) => {
|
||||
const { data } = await apiRequest.get(`/api/v1/key/${workspaceId}/latest`);
|
||||
return data;
|
||||
}
|
||||
|
||||
export default getLatestFileKey;
|
||||
|
||||
@@ -1,23 +1,17 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import Head from 'next/head';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
||||
import { getTranslatedServerSideProps } from '@app/components/utilities/withTranslateProps';
|
||||
import { CreateServiceAccountPage } from '@app/views/Settings/CreateServiceAccountPage';
|
||||
|
||||
export default function ServiceAccountPage() {
|
||||
const router = useRouter();
|
||||
// const { orgId, serviceAccountId } = router.query;
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Edit Service Account</title>
|
||||
<link rel="icon" href="/infisical.ico" />
|
||||
</Head>
|
||||
<div />
|
||||
<CreateServiceAccountPage />
|
||||
</>
|
||||
);
|
||||
@@ -25,7 +19,7 @@ export default function ServiceAccountPage() {
|
||||
|
||||
ServiceAccountPage.requireAuth = true;
|
||||
|
||||
export const getServerSidePros = getTranslatedServerSideProps([
|
||||
export const getServerSideProps = getTranslatedServerSideProps([
|
||||
'settings',
|
||||
'settings-org',
|
||||
'section-incident',
|
||||
|
||||
Reference in New Issue
Block a user