mirror of
https://github.com/bitwarden/server.git
synced 2025-07-09 03:43:51 -05:00
[SM-394] Secrets Manager (#2164)
Long lived feature branch for Secrets Manager Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> Co-authored-by: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com> Co-authored-by: CarleyDiaz-Bitwarden <103955722+CarleyDiaz-Bitwarden@users.noreply.github.com> Co-authored-by: Thomas Avery <tavery@bitwarden.com> Co-authored-by: Colton Hurst <colton@coltonhurst.com>
This commit is contained in:
7
src/Core/Repositories/IAccessPolicyRepository.cs
Normal file
7
src/Core/Repositories/IAccessPolicyRepository.cs
Normal file
@ -0,0 +1,7 @@
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Core.Repositories;
|
||||
|
||||
public interface IAccessPolicyRepository : IRepository<AccessPolicy, Guid>
|
||||
{
|
||||
}
|
10
src/Core/Repositories/IApiKeyRepository.cs
Normal file
10
src/Core/Repositories/IApiKeyRepository.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Models.Data;
|
||||
|
||||
namespace Bit.Core.Repositories;
|
||||
|
||||
public interface IApiKeyRepository : IRepository<ApiKey, Guid>
|
||||
{
|
||||
Task<ApiKeyDetails> GetDetailsByIdAsync(Guid id);
|
||||
Task<ICollection<ApiKey>> GetManyByServiceAccountIdAsync(Guid id);
|
||||
}
|
13
src/Core/Repositories/IProjectRepository.cs
Normal file
13
src/Core/Repositories/IProjectRepository.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Core.Repositories;
|
||||
|
||||
public interface IProjectRepository
|
||||
{
|
||||
Task<IEnumerable<Project>> GetManyByOrganizationIdAsync(Guid organizationId, Guid userId);
|
||||
Task<IEnumerable<Project>> GetManyByIds(IEnumerable<Guid> ids);
|
||||
Task<Project> GetByIdAsync(Guid id);
|
||||
Task<Project> CreateAsync(Project project);
|
||||
Task ReplaceAsync(Project project);
|
||||
Task DeleteManyByIdAsync(IEnumerable<Guid> ids);
|
||||
}
|
14
src/Core/Repositories/ISecretRepository.cs
Normal file
14
src/Core/Repositories/ISecretRepository.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Core.Repositories;
|
||||
|
||||
public interface ISecretRepository
|
||||
{
|
||||
Task<IEnumerable<Secret>> GetManyByOrganizationIdAsync(Guid organizationId);
|
||||
Task<IEnumerable<Secret>> GetManyByIds(IEnumerable<Guid> ids);
|
||||
Task<IEnumerable<Secret>> GetManyByProjectIdAsync(Guid projectId);
|
||||
Task<Secret> GetByIdAsync(Guid id);
|
||||
Task<Secret> CreateAsync(Secret secret);
|
||||
Task<Secret> UpdateAsync(Secret secret);
|
||||
Task SoftDeleteManyByIdAsync(IEnumerable<Guid> ids);
|
||||
}
|
11
src/Core/Repositories/IServiceAccountRepository.cs
Normal file
11
src/Core/Repositories/IServiceAccountRepository.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Core.Repositories;
|
||||
|
||||
public interface IServiceAccountRepository
|
||||
{
|
||||
Task<IEnumerable<ServiceAccount>> GetManyByOrganizationIdAsync(Guid organizationId);
|
||||
Task<ServiceAccount> GetByIdAsync(Guid id);
|
||||
Task<ServiceAccount> CreateAsync(ServiceAccount serviceAccount);
|
||||
Task ReplaceAsync(ServiceAccount serviceAccount);
|
||||
}
|
Reference in New Issue
Block a user