Skip to content

Commit 17b18ea

Browse files
authored
Merge pull request #51 from adobe-apiplatform/extension-example-files
Integrate the extension example files from v1 for use on master.
2 parents 7656df3 + 5199283 commit 17b18ea

File tree

2 files changed

+123
-0
lines changed

2 files changed

+123
-0
lines changed
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
dashboard:
2+
# specifies the configurations for the Adobe Enterprise Dashboards.
3+
# By default, it would look for dashboard-owning-config.yml and
4+
# dashboard-accessor-*-config.yml in the configuration path,
5+
# with the yml's identifying the owning organization and accessor organizations
6+
# respectively.
7+
#
8+
# You can also specify the configurations under this section too,
9+
# with keys owning and accessors.
10+
#
11+
# Examples:
12+
# owning: example.dashboard-config.yml
13+
# accessors:
14+
# org1: example.dashboard-config.yml
15+
16+
# specifies the filename format for the accessor org configurations.
17+
# a filename that matches the format will have the organization name extracted
18+
# from the filename. Default is:
19+
# accessor_config_filename_format: "dashboard-accessor-{organization_name}-config.yml"
20+
21+
directory:
22+
# (optional) Default country code to use if directory doesn't provide one for a user [Must be two-letter ISO-3166 code - see https://en.wikipedia.org/wiki/ISO_3166-1]
23+
#
24+
# example:
25+
# default_country_code: US
26+
27+
connectors:
28+
# specifies the configurations for the difference directory connectors
29+
# The format is name : value, where value can be:
30+
# a dictionary for the actual configuration, or
31+
# a string for the file containing the configuration, or
32+
# a list containing a mixture of dictionaries and strings
33+
#
34+
# examples:
35+
# ldap: example.connector-ldap.yml
36+
# ldap:
37+
# - host: LDAP_host_URL_goes_here
38+
# base_dn: base_DN_goes_here
39+
# - connector-ldap-credentials.yml
40+
41+
groups:
42+
# specifies the list of group mappings, with each group mapping consisting
43+
# of a dictionary with keys: directory_group and dashboard_groups.
44+
# directory_group: string identifying the group in the directory
45+
# dashboard_groups: a list of strings identifying the dashboard groups.
46+
#
47+
# a group in dashboard_groups can be qualified with, the first part being
48+
# the accessor organization name.
49+
# e.g. org1::Default Acrobat Pro DC configuration
50+
#
51+
# examples:
52+
# - directory_group: AdobeCC-All #Group CN
53+
# dashboard_groups:
54+
# - All Apps
55+
# - directory_group: AdobeCC-Photoshop
56+
# dashboard_groups:
57+
# - Photoshop Users
58+
# - directory_group: acrobat
59+
# dashboard_groups:
60+
# - org1::Default Acrobat Pro DC configuration
61+
62+
# specifies the default identity type of the dashboard user to create,
63+
# when the identity type of a user is missing.
64+
# valid values are: enterpriseID, federatedID
65+
#
66+
# Default is:
67+
# user_identity_type: enterpriseID
68+
69+
70+
extensions:
71+
# specifies custom Python code to be executed for each user after mappings are computed, but before actions are generated.
72+
# 'context' must be present and (currently) must have the value 'per-user'.
73+
#
74+
# hook code executes in a scope containing the following global variables:
75+
#
76+
# source_attributes # in: attributes retrieved from customer directory system (eg 'c', 'givenName')
77+
# # out: N/A
78+
# source_groups # in: customer-side directory groups found for user
79+
# # out: N/A
80+
# target_attributes # in: user's attributes for UMAPI calls as defined by usual rules (eg 'country', 'firstname')
81+
# # out: user's attributes for UMAPI calls as potentially changed by hook code
82+
# target_groups # in: Adobe-side dashboard groups mapped for user by usual rules
83+
# # out: Adobe-side dashboard groups as potentially changed by hook code
84+
# hook_storage # for exclusive use by hook code: initialized to None; persists across per-user calls
85+
# logger # an object of type logging.logger which outputs to the console and/or file log
86+
#
87+
- context: per-user
88+
extended_attributes:
89+
- bc
90+
- subco
91+
extended_dashboard_groups:
92+
- Company 1 Users
93+
- Company 2 Users
94+
after_mapping_hook: |
95+
bc = source_attributes.get('bc')
96+
subco = source_attributes.get('subco')
97+
if bc is not None:
98+
target_attributes['country'] = bc[0:2]
99+
if subco == 'Company 1':
100+
target_groups.add('Company 1 Users')
101+
elif subco == 'Company 2':
102+
target_groups.add('Company 2 Users')
103+
104+
limits:
105+
max_deletions_per_run: 10 # if --remove-nonexistent-users is specified, this is the most users that will be removed. Others will be left for a later run. A critical message will be logged.
106+
max_missing_users: 200 # if more than this number of user accounts are not found in the directory, user sync will abort with an error and a critical message will be logged.
107+
108+
logging:
109+
# specifies whether you wish to generate a log file
110+
# 'True' or 'False'
111+
log_to_file: True
112+
# output path for logs
113+
file_log_directory: logs
114+
# File Logging Level: Can be "debug", "info", "warning", "error", or "critical".
115+
# This is in ascending order, meaning "debug" < "critical".
116+
file_log_level: debug
117+
# Console Logging Level: Can be "debug", "info", "warning", "error", or "critical".
118+
# This is in ascending order, meaning "debug" < "critical". Default is:
119+
# console_log_level: debug
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
firstname,lastname,email,country,groups,bc,subco,type,user,domain
2+
Hook1,User,[email protected],US,,JP1234567,"Company 1",federatedID
3+
Hook2,User,[email protected],US,,GB0070008,"Company 2",federatedID
4+
Hook3,User,[email protected],US,,FR4444444,"Company 3",federatedID

0 commit comments

Comments
 (0)