Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature/confidential-view-additional-mdm-parameters ] MDM parameters for watermark text control #1446

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

hosy
Copy link
Collaborator

@hosy hosy commented Mar 4, 2025

Description

Added MDM parameters for watermark text control.

  • Introduced new MDM parameters to configure watermark text
  • Ensures better flexibility and compliance with security policies

Please use this MDM-Parameters to test the new features.

Branding.plist:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>confidential.text-color</key>
	<string>#ff88AA</string>
	<key>confidential.text-opacity</key>
	<integer >60</integer >
	<key>confidential.text-column-spacing</key>
	<integer>80</integer>
	<key>confidential.text-line-spacing</key>
	<integer>40</integer>
	<key>confidential.visible-redacted-characters</key>
	<integer>-1</integer>
	<key>confidential.text-show-user-email</key>
	<true/>
	<key>confidential.text-show-user-id</key>
	<true/>
	<key>confidential.text-show-timestamp</key>
	<true/>
	<key>confidential.text-custom-text</key>
	<string>This is a test</string>
</dict>
</plist>

Change values for testing or remove them to test default values.

Possible values for confidential.visible-redacted-characters :

  • -1 redacte text is disabled
  • >= 0 number of redacted charecters

Related Issue

https://github.com/owncloud/enterprise/issues/7103
https://github.com/owncloud/enterprise/issues/7104
https://github.com/owncloud/enterprise/issues/7105
https://github.com/owncloud/enterprise/issues/7106
#1447

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • Added an issue with details about all relevant changes in the iOS documentation repository.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.#
  • Added changelog files for the fixed issues in folder changelog/unreleased

QA

Checks: #1446 (comment)

Reports:

Sorry, something went wrong.

- Introduced new MDM parameters to configure watermark text
- Ensures better flexibility and compliance with security policies
@hosy hosy self-assigned this Mar 4, 2025
@hosy hosy requested review from felix-schwarz and jesmrec March 4, 2025 13:10
@jesmrec
Copy link
Contributor

jesmrec commented Mar 4, 2025

[WIP]

confidential.text-color

#ff88AA (default) ✅
#000000 (black) ✅
#ffffff (white) ✅
#008000 (green) ✅
#8f00ff (violet) ✅

confidential.text-opacity

0 (transparent) ✅
0.1 (almost transparent) ✅
0.6 (default) ✅
1 (total opacity) ✅
5 (saturated, total opacity) ✅

confidential.text-line-spacing

40 (default) ✅
20 (a little crowded) ✅
10 (crowded) ✅
70 (light) ✅
100 (almost invisible) ✅
0 (very crowded, no spacing) ✅

confidential.visible-redacted-characters

-1 (no redacted) ✅
0 (redacted) ✅
1 (one char redacted) ✅
5 (five chars redacted) ✅
15 (fifteen chars redacted) ✅

confidential.text-show-user-email

true (shows email) ✅
false (does not show email) ✅

confidential.text-show-user-id

true (shows user id) ✅
false (does not show user id) ✅

confidential.text-show-timestamp

true (shows current timestamp) ✅
false (does not show current timestamp) ✅

confidential.text-custom-text

empty ✅
a
hello
!·&quot;$%\&amp;/()
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum ✅ (in this case, the other printed fields are hidden behind such a long text)

all togehter

All disabled (no watermark) ✅

two of them enabled, the other two disabled (just couple of combinations) ✅

email disabled, other enabled (no email in watermark) ✅
user-id disabled, other enabled (no user-id in watermark) ✅
timestamp disabled, other enabled (no timestamp in watermark) ✅
text empty, other enabled (no text in watermark) ✅

all enabled ✅

@jesmrec
Copy link
Contributor

jesmrec commented Mar 5, 2025

(1) [WONT FIX]

@hosy about the following branding parameter confidential.text-show-user-id

When it is true, a user whose username is alice will show alice:0 in the watermark, like:

Screenshot 2025-03-05 at 08 25 23

i also checked with other usernames, and the :0 is always included. Could you take a look into?

iPhone XR iOS18.2
a5cb65de8

@jesmrec
Copy link
Contributor

jesmrec commented Mar 5, 2025

(2) [FIXED]

NOTE:

the following parameter list:

  <key>confidential.mark-confidential-views</key>
  <true/>
  <key>confidential.text-show-user-email</key>
  <false/>
  <key>confidential.text-show-user-id</key>
  <false/>
  <key>confidential.text-show-timestamp</key>
  <false/>
  <key>confidential.text-custom-text</key>
  <string></string>

as confidential.mark-confidential-views is true, a watermark is expected. But, as the other parameters are false or empty, nothing is printed and the real effect in the screen is the same as confidential.mark-confidential-views with false. Behaviour expected but to have in mind.

Suggestion: in that edge case, printing a default string like watermark or screen saver would make it more consistent, so that confidential.mark-confidential-views as true will set a default watermark.

@jesmrec
Copy link
Contributor

jesmrec commented Mar 5, 2025

(3) [FIXED]

Setting the following parameters:

  <key>confidential.text-color</key>
  <string>#8F00FF</string>
  <key>confidential.text-opacity</key>
  <real>0.5</real>

it's a violet color with medium opacity. That's how it looks like in the device:

Screenshot 2025-03-05 at 08 51 36

the color is correct, but, it's like applying different opacity values in different rows. With this violet color is easiest to appreciate than with other darker colors.

Could something be done about this?

iPhone XR iOS18.2
a5cb65de8

- add a fallback watermark message if all options were disabled via MDM
- fixed duplicated watermark views (remove existing watermark view before adding a new one)
@jesmrec
Copy link
Contributor

jesmrec commented Mar 5, 2025

Checking commit cabaf3c2b

(1) -> still reproducible. alice:0 in the watermark

(2) -> the default is now the timestamp + email, but they are both false in the branding options for the given case, so, i'd not go for this.

(3) -> fixed ✅

@hosy
Copy link
Collaborator Author

hosy commented Mar 5, 2025

Checking commit cabaf3c2b

(1) -> still reproducible. alice:0 in the watermark

Yes, but this is the server user id and this behaviour is expected

(2) -> the default is now the timestamp + email, but they are both false in the branding options for the given case, so, i'd not go for this.

This is a fallback, if all MDM watermark texts are disabled. Otherwise no watermark text would be shown. I decided to choose timestamp + email as fallback.

(3) -> fixed ✅

Great!

@jesmrec
Copy link
Contributor

jesmrec commented Mar 5, 2025

This is a fallback, if all MDM watermark texts are disabled. Otherwise no watermark text would be shown. I decided to choose timestamp + email as fallback.

i know, a fallback is OK as suggested here.

The first approach did not show a watermark when confidential.mark-confidential-views is true and that's not consistent.

But the second, shows timestamp and email in watermark when both of them are false: not consistent either.

What do you think @felix-schwarz, @DeepDiver1975?

@hosy
Copy link
Collaborator Author

hosy commented Mar 5, 2025

This is a fallback, if all MDM watermark texts are disabled. Otherwise no watermark text would be shown. I decided to choose timestamp + email as fallback.

i know, a fallback is OK as suggested here.

The first approach did not show a watermark when confidential.mark-confidential-views is true and that's not consistent.

But the second, shows timestamp and email in watermark when both of them are false: not consistent either.

What do you think @felix-schwarz, @DeepDiver1975?

Maybe more a question for @solalafee

@solalafee
Copy link

Hi everyone, regarding the open question, as user I would expect not having an additional option confidential.mark-confidential-views which needs to be active, if I want to choose the watermark type. Seems to me also an additional unnecessary step, but maybe I am wrong here?

In Kiteworks the user selects directly the watermark type and if selected, the respective is shown. If nothing is selected, nothing is shown.

image

… will be shown, as soon as at least one MDM parameter confidential.text-show-user-email, confidential.text-show-user-id, confidential.text-show-timestamp, confidential.text-custom-text was set
@hosy
Copy link
Collaborator Author

hosy commented Mar 5, 2025

@jesmrec we found a final solution: MDM parameter confidential.mark-confidential-views was removed.
Watermark will be shown, as soon as at least one MDM parameter confidential.text-show-user-email, confidential.text-show-user-id, confidential.text-show-timestamp, confidential.text-custom-text was set.

You can completely remove the MDM parameter confidential.mark-confidential-views from the Branding.plist file.

@jesmrec
Copy link
Contributor

jesmrec commented Mar 5, 2025

Thanks @solalafee @hosy for the final inputs. I've changed the list of test cases to make the process according the new implementation. It works as expected, so, it's approved on my side.

As i can see, this branch starts from 12.4.0, right?

@jesmrec jesmrec added the Approved by QA Approved by QA label Mar 5, 2025
hosy added 3 commits March 10, 2025 10:40
…the watermark text in pixel

- changed text opacity type float to integer (MDM systems does not provide a float type)
- added missing MDM parameter documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved by QA Approved by QA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants