Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**run_id** | **i32** | |
**start_time** | **String** | |
**startup_request_count** | **i32** | |
**version** | **String** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**id** | [**uuid::Uuid**](uuid::Uuid.md) | |
**name** | **String** | |
**prompt_secure_desktop** | **bool** | |
**target_must_be_signed** | **bool** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,25 @@ pub struct AboutData {
pub start_time: String,
#[serde(rename = "StartupRequestCount")]
pub startup_request_count: i32,
#[serde(rename = "Version")]
pub version: String,
}

impl AboutData {
pub fn new(current_request_count: i32, run_id: i32, start_time: String, startup_request_count: i32) -> AboutData {
pub fn new(
current_request_count: i32,
run_id: i32,
start_time: String,
startup_request_count: i32,
version: String,
) -> AboutData {
AboutData {
current_request_count,
last_request_time: None,
run_id,
start_time,
startup_request_count,
version,
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ pub struct Profile {
pub name: String,
#[serde(rename = "PromptSecureDesktop")]
pub prompt_secure_desktop: bool,
#[serde(rename = "TargetMustBeSigned")]
pub target_must_be_signed: bool,
}

impl Profile {
Expand All @@ -35,6 +37,7 @@ impl Profile {
id: uuid::Uuid,
name: String,
prompt_secure_desktop: bool,
target_must_be_signed: bool,
) -> Profile {
Profile {
default_elevation_kind,
Expand All @@ -43,6 +46,7 @@ impl Profile {
id,
name,
prompt_secure_desktop,
target_must_be_signed,
}
}
}
1 change: 1 addition & 0 deletions crates/devolutions-pedm-shared/src/policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ pub struct Profile {
pub elevation_settings: ElevationConfigurations,
pub default_elevation_kind: ElevationKind,
pub prompt_secure_desktop: bool,
pub target_must_be_signed: bool,
}

impl Identifiable for Profile {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35506.116 d17.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Devolutions.Pedm.Client", "src\Devolutions.Pedm.Client\Devolutions.Pedm.Client.csproj", "{0EB49E08-5842-4A2E-A5AC-926E6DD65C15}"
# Visual Studio 2012
VisualStudioVersion = 12.0.0.0
MinimumVisualStudioVersion = 10.0.0.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Devolutions.Pedm.Client", "src\Devolutions.Pedm.Client\Devolutions.Pedm.Client.csproj", "0eb49e08-5842-4a2e-a5ac-926e6dd65c15"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0EB49E08-5842-4A2E-A5AC-926E6DD65C15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0EB49E08-5842-4A2E-A5AC-926E6DD65C15}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0EB49E08-5842-4A2E-A5AC-926E6DD65C15}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0EB49E08-5842-4A2E-A5AC-926E6DD65C15}.Release|Any CPU.Build.0 = Release|Any CPU
0eb49e08-5842-4a2e-a5ac-926e6dd65c15.Debug|Any CPU.ActiveCfg = Debug|Any CPU
0eb49e08-5842-4a2e-a5ac-926e6dd65c15.Debug|Any CPU.Build.0 = Debug|Any CPU
0eb49e08-5842-4a2e-a5ac-926e6dd65c15.Release|Any CPU.ActiveCfg = Release|Any CPU
0eb49e08-5842-4a2e-a5ac-926e6dd65c15.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
EndGlobal
2 changes: 1 addition & 1 deletion crates/devolutions-pedm/openapi/dotnet-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version:
- SDK version: 2025.5.14
- SDK version: 2025.5.15
- Generator version: 7.7.0
- Build package: org.openapitools.codegen.languages.CSharpClientCodegen

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ components:
schemas:
AboutData:
example:
Version: Version
LastRequestTime: 2000-01-23T04:56:07.000+00:00
StartTime: 2000-01-23T04:56:07.000+00:00
RunId: 1
Expand All @@ -368,11 +369,14 @@ components:
StartupRequestCount:
format: int32
type: integer
Version:
type: string
required:
- CurrentRequestCount
- RunId
- StartTime
- StartupRequestCount
- Version
Assignment:
example:
Users:
Expand All @@ -386,6 +390,7 @@ components:
AccountName: AccountName
Profile:
PromptSecureDesktop: true
TargetMustBeSigned: true
DefaultElevationKind: AutoApprove
Id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
ElevationSettings:
Expand Down Expand Up @@ -842,6 +847,7 @@ components:
Profile:
example:
PromptSecureDesktop: true
TargetMustBeSigned: true
DefaultElevationKind: AutoApprove
Id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
ElevationSettings:
Expand All @@ -866,13 +872,16 @@ components:
type: string
PromptSecureDesktop:
type: boolean
TargetMustBeSigned:
type: boolean
required:
- DefaultElevationKind
- ElevationMethod
- ElevationSettings
- Id
- Name
- PromptSecureDesktop
- TargetMustBeSigned
SessionElevationConfiguration:
example:
Enabled: true
Expand Down
2 changes: 1 addition & 1 deletion crates/devolutions-pedm/openapi/dotnet-client/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"packageAuthors": "Devolutions Inc.",
"packageName": "Devolutions.Pedm.Client",
"packageTitle": "Devolutions PEDM REST API Client",
"packageVersion": "2025.5.14",
"packageVersion": "2025.5.15",
"packageDescription": "Client for Devolutions PEDM REST API",
"packageGuid": "0eb49e08-5842-4a2e-a5ac-926e6dd65c15",
"packageCopyright": "© Devolutions Inc. All rights reserved.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**RunId** | **int** | |
**StartTime** | **DateTime** | |
**StartupRequestCount** | **int** | |
**VarVersion** | **string** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**Id** | **Guid** | |
**Name** | **string** | |
**PromptSecureDesktop** | **bool** | |
**TargetMustBeSigned** | **bool** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class Configuration : IReadableConfiguration
/// Version of the package.
/// </summary>
/// <value>Version of the package.</value>
public const string Version = "2025.5.14";
public const string Version = "2025.5.15";

/// <summary>
/// Identifier for ISO 8601 DateTime Format
Expand Down Expand Up @@ -116,7 +116,7 @@ public class Configuration : IReadableConfiguration
public Configuration()
{
Proxy = null;
UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/2025.5.14/csharp");
UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/2025.5.15/csharp");
BasePath = "http://localhost";
DefaultHeaders = new ConcurrentDictionary<string, string>();
ApiKey = new ConcurrentDictionary<string, string>();
Expand Down Expand Up @@ -539,7 +539,7 @@ public static string ToDebugReport()
report += " OS: " + System.Environment.OSVersion + "\n";
report += " .NET Framework Version: " + System.Environment.Version + "\n";
report += " Version of the API: \n";
report += " SDK Package Version: 2025.5.14\n";
report += " SDK Package Version: 2025.5.15\n";

return report;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Description>Client for Devolutions PEDM REST API</Description>
<Copyright>© Devolutions Inc. All rights reserved.</Copyright>
<RootNamespace>Devolutions.Pedm.Client</RootNamespace>
<Version>2025.5.14</Version>
<Version>2025.5.15</Version>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Devolutions.Pedm.Client.xml</DocumentationFile>
<PackageLicenseExpression>MIT OR Apache-2.0</PackageLicenseExpression>
<RepositoryUrl>https://github.com/Devolutions/devolutions-gateway.git</RepositoryUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,19 @@ protected AboutData() { }
/// <param name="runId">runId (required).</param>
/// <param name="startTime">startTime (required).</param>
/// <param name="startupRequestCount">startupRequestCount (required).</param>
public AboutData(int currentRequestCount = default(int), DateTime lastRequestTime = default(DateTime), int runId = default(int), DateTime startTime = default(DateTime), int startupRequestCount = default(int))
/// <param name="varVersion">varVersion (required).</param>
public AboutData(int currentRequestCount = default(int), DateTime lastRequestTime = default(DateTime), int runId = default(int), DateTime startTime = default(DateTime), int startupRequestCount = default(int), string varVersion = default(string))
{
this.CurrentRequestCount = currentRequestCount;
this.RunId = runId;
this.StartTime = startTime;
this.StartupRequestCount = startupRequestCount;
// to ensure "varVersion" is required (not null)
if (varVersion == null)
{
throw new ArgumentNullException("varVersion is a required property for AboutData and cannot be null");
}
this.VarVersion = varVersion;
this.LastRequestTime = lastRequestTime;
}

Expand Down Expand Up @@ -84,6 +91,12 @@ protected AboutData() { }
[DataMember(Name = "StartupRequestCount", IsRequired = true, EmitDefaultValue = true)]
public int StartupRequestCount { get; set; }

/// <summary>
/// Gets or Sets VarVersion
/// </summary>
[DataMember(Name = "Version", IsRequired = true, EmitDefaultValue = true)]
public string VarVersion { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand All @@ -97,6 +110,7 @@ public override string ToString()
sb.Append(" RunId: ").Append(RunId).Append("\n");
sb.Append(" StartTime: ").Append(StartTime).Append("\n");
sb.Append(" StartupRequestCount: ").Append(StartupRequestCount).Append("\n");
sb.Append(" VarVersion: ").Append(VarVersion).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ protected Profile() { }
/// <param name="id">id (required).</param>
/// <param name="name">name (required).</param>
/// <param name="promptSecureDesktop">promptSecureDesktop (required).</param>
public Profile(ElevationKind defaultElevationKind = default(ElevationKind), ElevationMethod elevationMethod = default(ElevationMethod), ElevationConfigurations elevationSettings = default(ElevationConfigurations), Guid id = default(Guid), string name = default(string), bool promptSecureDesktop = default(bool))
/// <param name="targetMustBeSigned">targetMustBeSigned (required).</param>
public Profile(ElevationKind defaultElevationKind = default(ElevationKind), ElevationMethod elevationMethod = default(ElevationMethod), ElevationConfigurations elevationSettings = default(ElevationConfigurations), Guid id = default(Guid), string name = default(string), bool promptSecureDesktop = default(bool), bool targetMustBeSigned = default(bool))
{
this.DefaultElevationKind = defaultElevationKind;
this.ElevationMethod = elevationMethod;
Expand All @@ -75,6 +76,7 @@ protected Profile() { }
}
this.Name = name;
this.PromptSecureDesktop = promptSecureDesktop;
this.TargetMustBeSigned = targetMustBeSigned;
}

/// <summary>
Expand All @@ -101,6 +103,12 @@ protected Profile() { }
[DataMember(Name = "PromptSecureDesktop", IsRequired = true, EmitDefaultValue = true)]
public bool PromptSecureDesktop { get; set; }

/// <summary>
/// Gets or Sets TargetMustBeSigned
/// </summary>
[DataMember(Name = "TargetMustBeSigned", IsRequired = true, EmitDefaultValue = true)]
public bool TargetMustBeSigned { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand All @@ -115,6 +123,7 @@ public override string ToString()
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" PromptSecureDesktop: ").Append(PromptSecureDesktop).Append("\n");
sb.Append(" TargetMustBeSigned: ").Append(TargetMustBeSigned).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down
6 changes: 6 additions & 0 deletions crates/devolutions-pedm/openapi/pedm-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ components:
- RunId
- StartTime
- StartupRequestCount
- Version
properties:
CurrentRequestCount:
type: integer
Expand All @@ -361,6 +362,8 @@ components:
StartupRequestCount:
type: integer
format: int32
Version:
type: string
Assignment:
type: object
required:
Expand Down Expand Up @@ -644,6 +647,7 @@ components:
- Id
- Name
- PromptSecureDesktop
- TargetMustBeSigned
properties:
DefaultElevationKind:
$ref: '#/components/schemas/ElevationKind'
Expand All @@ -658,6 +662,8 @@ components:
type: string
PromptSecureDesktop:
type: boolean
TargetMustBeSigned:
type: boolean
SessionElevationConfiguration:
type: object
required:
Expand Down
1 change: 1 addition & 0 deletions crates/devolutions-pedm/src/api/about.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ pub(crate) async fn about(
startup_request_count: state.startup_info.request_count,
current_request_count: state.req_counter.load(Ordering::Relaxed),
last_request_time: db.get_last_request_time().await?,
version: win_api_wrappers::utils::get_exe_version()?,
}))
}
6 changes: 6 additions & 0 deletions crates/devolutions-pedm/src/api/err.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ impl From<DbError> for HandlerError {
}
}

impl From<anyhow::Error> for HandlerError {
fn from(e: anyhow::Error) -> Self {
Self(StatusCode::INTERNAL_SERVER_ERROR, Some(e.to_string()))
}
}

#[cfg(feature = "postgres")]
impl From<tokio_postgres::Error> for HandlerError {
fn from(e: tokio_postgres::Error) -> Self {
Expand Down
1 change: 1 addition & 0 deletions crates/devolutions-pedm/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pub(crate) struct AboutData {
///
/// This can be `None` if `/about` is the first request made.
pub last_request_time: Option<DateTime<Utc>>,
pub version: String,
}

/// Immutable startup info.
Expand Down
Loading