Commit graph

877 commits

Author SHA1 Message Date
HellAholic
ebb91b3651
Merge branch 'main' into CURA-12718_dont_send_username
Some checks failed
conan-package-resources / conan-package (push) Has been cancelled
conan-package / conan-package (push) Has been cancelled
printer-linter-format / Printer linter auto format (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
conan-package-resources / signal-curator (push) Has been cancelled
2025-10-31 14:11:19 +01:00
Remco Burema
89ba272adf Don't send username for local printer connections.
CURA-12718
2025-10-23 11:51:41 +02:00
Remco Burema
cd3aa02440 Show the user a warning when the printer requires authentication.
Also hide it when appropriate.

part of CURA-12717
2025-10-22 12:19:26 +02:00
Remco Burema
6f41127628 Make sure to require authentication again.
... even if it was previously obtained in the session, but something changed (on, say, the printers side).

done as part of CURA-12717
2025-10-22 12:16:59 +02:00
Remco Burema
fb574bba25 Reduce log-spam.
Some checks failed
conan-package / conan-package (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
done as part of CURA-12708
2025-09-30 11:38:33 +02:00
Remco Burema
971fb9d104 Save authorization per-cluster instead of in 1 value.
This would otherwise invalidate all authorization information when switching printers.

part of CURA-12708
2025-09-30 11:37:36 +02:00
Remco Burema
c1fd3c9aba Store printer-API creds is prefs.
It's OK to do this in this manner and not via for example the keyring, since we there's no actual user-name involved, only the machine-name -- anyone on the same machine is _already_ capable of sending the basically the exact same request that originated the access in the first place.

part of CURA-12708 (alt implementation)
2025-09-23 16:01:25 +02:00
Remco Burema
a8ac8e9332 Forgot to update this (needed for authentication).
part of CURA-12624
2025-09-10 10:26:39 +02:00
Remco Burema
70a8f9b0a3 Use machine-node-ID as username.
Otherwise there's _still_ personal information in there.

part of CURA-12624
2025-09-10 10:26:12 +02:00
Remco Burema
7fc87cb4c1 Fill in correct nonce and nonce-count for cluster-auth.
part of CURA-12624
2025-09-10 10:25:55 +02:00
Frederic Meeuwissen
6b1f29cdb1 Fix crash on AttributeError 2025-09-10 10:25:08 +02:00
Remco Burema
75fc0782da Code review: Replace string with enum.
First use of 3.11's StrEnum in the code base I think -- anyway, Python autoboxes these (maybe even the old str,enum things as well, but irrelevant now), so there's nothing in the way of making this an enum and have type-_checking_ instead of type-_o_'s.

done as part of CURA-12624
2025-09-10 10:24:00 +02:00
Remco Burema
7f35a5074b Make authentication info a little less brittle.
Otherwise if the server (on the printer) gives back something that can be parsed into JSON, but _isn't_ the authorization digest info, the thing breaks.

part of CURA-12624
2025-09-10 10:23:25 +02:00
Remco Burema
115d2d5b77 Fix 2 calls w.r.t. new authorization workflow _outside_ of the API.
New rules means we have to put printjobs and such behind a little authentication, as these contain personally identifiable info. These two effected calls where found _outside_ of the API class where I thought to be able to fix it 100%. See also the TODO's in the neighbourhood -- but I'm not sure I can just do what those say (move the relevant methods to the API), as those methods to be moved are _inside_ the larger Cura SDK (and they're public) and the place where I'm meant to move them to (the ClusterAPIClient) is _not_ (as they're in a plugin).

part of CURA-12624
2025-09-10 10:23:14 +02:00
Remco Burema
34eac462bd More authentication, since printer-API call-responses can include user-info.
The new regulations make a decent amount of sense -- but just because we agree with them doesn't mean we'd implemented this yet. Anyway, information wich can be used to personally identify people should be kept behind (virtual) locks and bars. The new firmware will only allow certain operations _after_ a request has been made to the .../auth/request endpoint, and someone in the physical vicinity (of the printer) has pressed ALLOW on a popup (with the application and name of the requester shown, on the printers' UI). After that, _as long as you put the relevant Authorization Digest in your HTTP headers_ (and use at least SHA-256), you may proceed to make other requests without the printer-server flipping out with a FORBIDDEN error.

The current commit _should_ also still work with printers that still have old (well, current I guess...) firmware -- but I didn't test that yet.

CURA-12624
2025-09-10 10:22:59 +02:00
Erwan MATHIEU
ae2a189c14 Replace "cloudActive" property by generic "active"
CURA-12557
2025-06-30 09:53:54 +02:00
HellAholic
9cf75648ab Review comment
Some checks failed
conan-package / conan-package (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
- Set default to `""` for `Optional[str]` to remove the `or ""`
-The FW version can be returned as None which requires the fallback `or ""`
2025-06-25 13:54:56 +02:00
HellAholic
6a230b3df5 ClusterPrinterStatus: optional init args
Prevents a cura crash if any of the args are not returned from api call
2025-06-24 14:03:07 +02:00
Erwan MATHIEU
2e9999ed2d Display the printer activation status
CURA-12557
2025-06-11 13:51:45 +02:00
Erwan MATHIEU
65b0e4f080 Add specific message when sending a print to an inactive printer
CURA-12557
2025-06-11 10:51:47 +02:00
Erwan MATHIEU
01fd82e8e5
Merge branch 'main' into fix_qml_py_re 2025-02-11 13:19:50 +01:00
Frederic98
0917f10105 Fix cloud connection for Sketch Sprint and Large 2024-12-19 11:43:29 +01:00
David Fries
6e3e3e6742 Use raw strings for regular expressions with invalid escape sequences
If "T(\d*)" was "T(\n*)" it would search for newlines.  There isn't
any such \d escape character.

It should be "T(\\d*)" or r"T(\d*)" going with the latter, to be
easier to read and be consistent with other Cura usage.

Start python with -Wd or for python 3.12 will raise a SyntaxWarning.
2024-08-31 12:11:59 -05:00
Remco Burema
77e0d705db The easy way to fix a slow response is to up the timeout.
This might on one hand have (other) consequences, and given the slowness we encounter not even be enough in some cases (may be related to the size of the messages?) May need to be fixed on server side.

attempt to adress CURA-11956
2024-08-07 18:04:18 +02:00
Saumya Jain
f7f56e8766 Add sketch to cloud
CURA-11777
2024-05-06 13:32:52 +02:00
Paul Kuiper
87c15b0d35 Updating name translation tables for Factor 4.
PP-470
2024-04-22 10:55:01 +02:00
Frederic Meeuwissen
f665281a6a Only load machine_id_to_name.json when it's needed for the first time 2024-03-27 11:19:59 +01:00
Frederic Meeuwissen
484cc6d42f Clean up CloudApiClient.py 2024-03-27 11:19:48 +01:00
Frederic Meeuwissen
8012df6518 Convert str.format to f-string 2024-03-27 11:19:36 +01:00
Frederic Meeuwissen
1bc8b90b56 Move definition ID to cloud name map to json file 2024-03-27 11:19:22 +01:00
Erwan MATHIEU
fa2257aaa3 Add fallback for uuid retrieval from DF
CURA-11655
2024-03-07 16:48:47 +01:00
saumya.jain
1e230ffef1 Printer name changed to printer type
printer names can be different for same type of printer.
Also, printer type is coming from cloud here so the type search is changed accordingly

CURA-11432
2024-01-03 14:19:22 +01:00
c.lamboo
a071795f9e Fix monitor page
CURA-11426
2023-12-15 12:43:54 +01:00
c.lamboo
0225f92ae0 Fix local cloud printing for um printers
CURA-11390
2023-11-27 13:47:08 +01:00
c.lamboo
e66a3cda67 Only extend file formats for um3
This was a mistake in the previous implementation. The relevant piece of code was adding ufp support for um3 printers. This is legacy support for this printer since the printer didn't know it supported ufp, but through the digital factory it could support ufp files. However, with the addition of method printers we should have added an additional check where we also check if the printer is an um3. Instead an additional check was added that did the same for makerbot printers. Because of this check didn't have a "is method" check support for makerbot format is also added to s-line printers and legacy um printers.

(fyi @saumyaj3)

CURA-11377
2023-11-24 15:40:11 +01:00
c.lamboo
31976e591f All method printers are cloud connected
CURA-11377
2023-11-24 15:35:31 +01:00
saumya.jain
ce132e4c3f Function name changed to make it a bit generic
CURA-11138
2023-10-31 11:48:44 +01:00
saumya.jain
39ec9c9279 printertype Parsing function made static
CURA-11138
2023-10-30 14:31:17 +01:00
saumya.jain
c2e2511fdc Makerbot machine firmware version set to min of 2.700
CURA-11138
2023-10-30 13:51:56 +01:00
saumya.jain
1cc7ce7a66 Message to show user when cloud printer is not available
-added png for makerbots for exception case

CURA-11138

CURA-11138
2023-10-27 17:08:05 +02:00
saumya.jain
3dd4ef7dda printer firmware version is major and minor in case of makerbot
CURA-11138
2023-10-27 11:41:06 +02:00
saumya.jain
37e236405a fix for functions
CURA-11138
2023-10-27 09:30:06 +02:00
saumya.jain
cf78ae0dca Method printers method, methodx, methodxl read from cloud
CURA-11138
2023-10-26 16:17:03 +02:00
Jaime van Kessel
e899b9987c
Merge branch 'PP-245-high-speed-profiles' of github.com:Ultimaker/Cura into CURA-10953_introduce_any_color_material 2023-09-07 15:03:27 +02:00
Jaime van Kessel
fd887a877a
Don't sync invisible materials
CURA-10953
2023-09-07 13:48:36 +02:00
c.lamboo
1f6c096bf7 Don't omit printers in printer list
Since the message is now scrollable we can do this :)
2023-08-22 16:42:34 +02:00
Jaime van Kessel
48965b75df
Fix URL of local printer interface pointing to non existing page
The URL was removed, so we now point to a page that does work
2023-05-01 13:07:32 +02:00
Jaime van Kessel
b5b6f8197b
Fix the writeStarted emit
When printing via abstract printer, this signal was not correctly emitted
causing the postprocessing script to fail

CURA-10524
2023-04-17 12:47:54 +02:00
jspijker
ebc50d65f1 Various small fixes
Contribute to CURA-10208
2023-03-06 12:31:39 +01:00
c.lamboo
b22fafadbe Don't capitalise "M" in "Ultimaker Digital Library" and "Ultimaker Digital Factory"
because these are brand names.

CURA-9793
2022-11-29 15:26:51 +01:00