Commit Graph

1269 Commits

Author SHA1 Message Date
akallabeth
52ff1cef93 [cmake] install SSO-MIB if build by ExternalProject
* Install the library if we build it as part of FreeRDP
* Format files with cmake-format
2025-06-02 19:40:44 +02:00
akallabeth
9763297d6a
[client,common] (re)initialize fuse root in cliprdr_file_context_init
The clipboard might be (re)initialized multiple times, to do
initialization and deinitialization in cliprdr_file_context_init and
cliprdr_file_context_uninit.
2025-06-02 09:20:22 +02:00
akallabeth
5d088ce9c0
[client,cliprdr] refactor file clipboard 2025-05-23 15:23:28 +02:00
akallabeth
03a72a56db
[client,common] lock clipboard on update 2025-05-22 14:58:21 +02:00
akallabeth
59d66237b7
[cmake] fix formatting 2025-05-22 14:58:19 +02:00
akallabeth
d7de808063
[client,common] move SSO_MIB detection to client/common 2025-05-22 10:28:05 +02:00
Armin Novak
46b5f890b6
[client,common] make sso-mib opaque
Contain details of implementation in sso_mib_new and sso_mib_free
2025-05-21 14:52:06 +02:00
Armin Novak
66a69a26e2
[client,common] initialize sso-mib late
Only initialize the sso-mib library when a token is requested for the
first time. This allows proper rdpSettings initialization in PreConnect.
2025-05-21 14:31:34 +02:00
Armin Novak
39f7972b28
[client,common] add common GetCommonAccessToken
If client-common is build with WITH_SSO_MIB inject a callback that first
tries to retrieve a token from sso-mib library and only if that fails
falls back to a client provided callback.
2025-05-21 14:00:10 +02:00
Andreas Ziegler
d3ba03bba4 refactor: move sso-mib token fetching into separate compilation unit 2025-05-21 11:44:16 +02:00
Andreas Ziegler
d6d6909d66 chore: allow fetching sso-mib as ExternalProject 2025-05-21 11:44:16 +02:00
Andreas Ziegler
8714019703 refactor: move MIBClientApp into struct rdp_client_context 2025-05-21 11:44:16 +02:00
Andreas Ziegler
5e76909881 feat: add login through MS identity broker via sso-mib interface
This change enables an alternative way of acquiring the necessary
access tokens through a local identity broker. In the current
implementation, we need to visit URLs twice and paste back the
URLs we are redirected to in order to extract authorization codes
and ultimately fetch the correct access tokens for RDP (described
here: <0>).

As an alternative, MS also provides the Microsoft Authentication
Library (MSAL) through which authentication can be handled more
or less in the background when we're using a trusted device. In
particular, we can request access tokens with the same
parameters as we're currently doing through the URL-based scheme.

As the MSAL bindings are not available for C, we implemented a
small wrapper library called sso-mib which is available at
https://github.com/siemens/sso-mib. This library translates the
high-level requests (such as acquire_token_interactive) to
respective messages on the D-Bus messaging bus which is used to
communicate with the identity broker service on Linux. The
library can be built as a .deb package and subsequently be
found through PkgConfig mechanisms in CMake.

When sso-mib is not available through pkg-config, it can also
be placed in external/, with the directory structure looking
like the following. include/ is copied from the root of the
sso-mib directory and lib/ populated with the built shared
library files and symlinks.

    external/
    ├── README
    └── sso-mib
        ├── include
        │   └── sso-mib
        │       ├── mib-account.h
        │       ├── mib-client-app.h
        │       ├── mib-exports.h
        │       ├── mib-pop-params.h
        │       ├── mib-prt.h
        │       ├── mib-prt-sso-cookie.h
        │       └── sso-mib.h
        └── lib
            ├── libsso-mib.so -> libsso-mib.so.0
            ├── libsso-mib.so.0 -> libsso-mib.so.0.4.0
            └── libsso-mib.so.0.4.0

This feature is currently hidden behind a configuration switch
and must be enabled via `-DWITH_SSO_MIB=ON`. If the connection
to the broker fails (for example, if no identity broker is
installed or running on the system), we automatically fall back
to the current scheme of copy-pasting URLs.

<0>: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/e967ebeb-9e9f-443e-857a-5208802943c2
2025-05-21 11:44:16 +02:00
akallabeth
7e11df73ba
[client,common] add setting FreeRDP_MonitorOverrideFlags
use this mask to mark monitor settings set from command line.
2025-04-10 08:31:56 +02:00
akallabeth
6314e93939
[cmake] drop legacy and unused cmake_policy
Some cmake_policy settings have long been active by default (3.13 is our
current baseline) or simply unused. Due to issues with CMake 4.0 lets
drop them
2025-04-03 08:31:36 +02:00
akallabeth
4fcc44fe72
[client,cmdline] fix rdp2tcp parsing
allow command lines without this channel to succeed as well.
2025-03-20 17:45:47 +01:00
akallabeth
1f26225f69
[client,cmdline] fix rdp2tcp argument passing 2025-03-20 17:31:20 +01:00
akallabeth
14b2dc08eb
[client,common] fix rdp parser
freerdp_client_file_string_reset used a return type but did not return
any value.
2025-03-18 17:32:22 +01:00
Martin Fleisz
22ace7e5c6 client: Fix population of string settings in rdp file
When calling `freerdp_client_populate_rdp_file_from_settings` you should
expect that all settings are populated to the rdp file instance. However
certain settings (i.e. cameras to redirect) where only updated if they
had a value but did not reset the setting.

This causes trouble if the file instance was used to load settings,
settings were altered and then populated back to the file instance.
2025-03-18 14:27:26 +01:00
Armin Novak
3e6707c443
[warnings] fix issues from ci builder 2025-03-12 12:02:04 +01:00
Martin Fleisz
3ec89323c8 client: Fix reading/writing of dynamic resolution RDP file setting 2025-03-10 12:48:14 +01:00
Martin Fleisz
87af371f72 [client] Fix writing incorrect type for integer values in RDP file 2025-03-07 09:46:54 +01:00
Michael Tokarev
19f129654e spelling: dont 2025-03-06 13:24:29 +03:00
Armin Novak
9be8518873
[client,common] fix gateway parameter parsing
Abort if an invalid /gateway:type:xxx parameter was passed.
2025-03-05 14:06:19 +01:00
Martin Fleisz
f2db1ffe94 client: Move buffer pointer after writing settings 2025-03-05 10:32:06 +01:00
akallabeth
6d541c8691 [warnings] eliminate dead code 2025-03-04 09:53:05 +01:00
akallabeth
031dd16079
[warnings] clean up unused parameter and dead code 2025-03-03 12:08:35 +01:00
Thore Sommer
30054052cc [client,cmdline] fix port parsing for gateway 2025-02-25 13:41:48 +01:00
akallabeth
51685ea1bd
[client,common] improve parsing of TLS options 2025-02-24 13:31:09 +01:00
akallabeth
770c0fde54
[client,common] improve docs for /kbd:remap option 2025-02-21 10:49:16 +01:00
akallabeth
4e111874de
[client,sdl] mark SDL2 as deprecated.
SDL2 client is a dead end due to lacking API (clipboard support, ...) so
mark the SDL2 client deprecated and point out there is a SDL3 version
available
2025-02-21 09:17:16 +01:00
akallabeth
02f59fa3ae
[client,file] fix missing NULL check 2025-02-14 13:26:02 +01:00
akallabeth
36c5826f45
[client,warnings] fix -Wunused-parameter for common 2025-02-13 15:54:04 +01:00
Armin Novak
e9fd6a33b6
[client,common] fix rdp file parser 2025-02-12 09:50:56 +01:00
akallabeth
9f8ed06f9a
[client,cmdling] use a typedef for callback function
typedef freerdp_command_line_handle_option_t to have a common type for
callback functions
2025-02-11 12:21:41 +01:00
akallabeth
a569fc9ea1
[client,common] split freerdp_client_settings_parse_command_line_arguments_int 2025-02-11 11:04:57 +01:00
akallabeth
45bb63652f
[client,common] split freerdp_client_write_rdp_file_buffer 2025-02-11 10:14:56 +01:00
akallabeth
00e61074b2
[unused] eliminate unused functions 2025-02-10 09:32:19 +01:00
fossdd
38aebbca64
[client,common] Avoid use of reserved types
__off_t is a internal type of glibc and does not exist on other libc's.
2025-02-07 19:12:04 +01:00
akallabeth
4538cefd74
[warnings] remove dead code 2025-02-04 14:55:46 +01:00
akallabeth
44f5b6c409
[warnings] fix various clang warnings 2025-02-04 11:22:00 +01:00
akallabeth
bbd16d922b
[client,cmdline] fix vmconnect checks 2025-01-08 21:05:24 +01:00
akallabeth
6701359cc1
[warnings] fix integer casting
* use WINPR_ASSERTING_INT_CAST where possible
* clean up client code
2024-12-19 12:45:23 +01:00
akallabeth
df12907099
[client,common] fix leak in client_cli_get_rdsaad_access_token 2024-12-16 14:01:49 +01:00
Armin Novak
16a7378c3c [client,common] improve /printer help 2024-12-11 14:33:54 +01:00
akallabeth
f2f81eaac2
Merge pull request #10944 from akallabeth/cmake-clean-fix
[cmake,configure_file] fix change checks
2024-12-10 16:21:37 +01:00
akallabeth
f25be351b1
[core,gateway] Make tenantid use optional 2024-12-10 15:13:16 +01:00
Armin Novak
f17c1830b7
[aad,avx] improve AzureAD support
* New setting GatewayAzureActiveDirectory to fetch wellknown from
* Clean up command line arguments, rename to make function better
  understandable
2024-12-10 15:12:41 +01:00
akallabeth
f92984b234
[client,aad] use configurable redirection url
Create the redirection URL for AAD auth from the endpoint configuration.
2024-12-10 15:12:36 +01:00
akallabeth
9fb721b8be
[client,common] add parameters for aad auth 2024-12-10 15:12:34 +01:00