Skip to content

Commit 661040a

Browse files
committed
Merge branch 'v2'
2 parents 3e8999f + 22a291e commit 661040a

File tree

260 files changed

+384
-11246
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

260 files changed

+384
-11246
lines changed

.appveyor/build.ps1

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
if ($env:python.endswith("36-x64")) {
2+
$ldapver="cp36-cp36m"
23
$pycmd = "${env:python}\python.exe"
34
& $pycmd -m venv venv
45
} else {
6+
$ldapver="cp27-cp27m"
57
$venvcmd = "${env:python}\Scripts\virtualenv.exe"
68
& $venvcmd venv
79
}
810
.\venv\Scripts\activate.ps1
11+
pip install external\okta-0.0.3.1-py2.py3-none-any.whl
12+
pip install external\pyldap-2.4.45-${ldapver}-win_amd64.whl
13+
pip install -e .
14+
pip install -e .[test]
15+
pip install -e .[setup]
16+
17+
if ($env:python.endswith("36-x64")) {
18+
pip uninstall -y enum34
19+
}
20+
921
make 2>&1
1022
dir dist
1123
mkdir release
@@ -14,9 +26,11 @@ cd release\
1426
Get-Command python
1527
$pyver=$(python -V 2>&1) -replace "Python ","py" -replace "\.",""
1628
echo "pyver: ${pyver}"
17-
7z a "user-sync-${env:APPVEYOR_REPO_TAG_NAME}-win64-${pyver}.tar.gz" user-sync.pex
29+
7z a -ttar "user-sync-${env:APPVEYOR_REPO_TAG_NAME}-win64-${pyver}.tar" user-sync.pex
30+
7z a -tgzip "user-sync-${env:APPVEYOR_REPO_TAG_NAME}-win64-${pyver}.tar.gz" "user-sync-${env:APPVEYOR_REPO_TAG_NAME}-win64-${pyver}.tar"
1831
7z a "user-sync-${env:APPVEYOR_REPO_TAG_NAME}-win64-${pyver}.zip" user-sync.pex
1932
cd ..
20-
7z a -ttar -so -r examples.tar examples | 7z a -si release\examples.tar.gz
33+
7z a -ttar -r release\examples.tar examples
34+
7z a -tgzip release\examples.tar.gz release\examples.tar
2135
7z a -r release\examples.zip examples\
22-
dir releases
36+
dir release

.appveyor/test.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.\venv\Scripts\activate.ps1
2+
python setup.py test
3+
exit $LASTEXITCODE

.travis.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,20 @@ matrix:
99
python:
1010
- 3.6
1111
install:
12-
- ".travis/install-ubuntu.sh"
12+
- .travis/install-ubuntu.sh
1313
script:
14-
- ".travis/build-py36.sh"
15-
- ".travis/release.sh"
14+
- .travis/build-py36.sh
15+
- .travis/release.sh
16+
- python setup.py test
1617
- env: IMG="ubuntu1604"
1718
python:
1819
- 2.7
1920
install:
20-
- ".travis/install-ubuntu.sh"
21+
- .travis/install-ubuntu.sh
2122
script:
22-
- ".travis/build-py27.sh"
23-
- ".travis/release.sh"
23+
- .travis/build-py27.sh
24+
- .travis/release.sh
25+
- python setup.py test
2426
- env: OS="centos:7" IMG="centos7" SH="docker exec -t ${IMG} bash -c"
2527
services:
2628
- docker
@@ -50,6 +52,8 @@ matrix:
5052
script:
5153
- $SH .travis/build-py27.sh
5254
- $SH .travis/release.sh
55+
- $SH "python setup.py test"
56+
5357
deploy:
5458
provider: releases
5559
api_key:

.travis/build-py27.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
#!/usr/bin/env bash
2+
pip install --upgrade pip setuptools
3+
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
4+
pip install -e .
5+
pip install -e .[test]
6+
pip install -e .[setup]
27
make

.travis/build-py36-centos.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ virtualenv venv -p /usr/bin/python3.6
33
source venv/bin/activate
44
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
55
pip install -e .
6+
pip install -e .[test]
7+
pip install -e .[setup]
68
pip uninstall -y enum34
79
make
810
pwd
911
.travis/release.sh
12+
python setup.py test

.travis/build-py36.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
33
pip install -e .
4+
pip install -e .[test]
5+
pip install -e .[setup]
46
pip uninstall -y enum34
57
make

RELEASE_NOTES.md

Lines changed: 43 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,64 @@
1-
# Release Notes for User Sync Tool Version 2.3
1+
# Release Notes for User Sync Tool Version 2.4
22

3-
These notes apply to v2.3 of 2018-07-31.
3+
These notes apply to v2.4 of 2018-01-28.
44

5-
## New Features
5+
# New Features
66

7-
User Sync can now connect to Okta enterprise directories. Create an Okta configuration and use the new `--connector okta` command-line argument to select that connector. See [the docs](https://adobe-apiplatform.github.io/user-sync.py/en/user-manual/advanced_configuration.html#the-okta-connector) for details.
7+
[#398](https://github.com/adobe-apiplatform/user-sync.py/issues/398) `max_adobe_only_users` can be set to a percentage of total users.
88

9-
There is a new command-line argument `--connector` for specifying whether to get directory information via LDAP file, by reading a CSV file, or via the Okta connector. The default connector is `ldap`. For CSV users, who formerly had to specify their input source with the `--users` argument, this optional argument offers the chance to specify `--users mapped` or `--users group ...` (since the CSV input can be specified with `--connector`). See [the docs](https://adobe-apiplatform.github.io/user-sync.py/en/user-manual/command_parameters.html) for details.
9+
[#323](https://github.com/adobe-apiplatform/user-sync.py/issues/323) Two-step group lookup. Certain LDAP systems do not support group membership queries. This feature adds new config options to `connector-ldap.yml` to enable a two-step LDAP user lookup workflow.
1010

11-
[#292](https://github.com/adobe-apiplatform/user-sync.py/issues/292) You can now specify the log file name as well as the log file directory in your configuration file. The name is specified by giving a Python format string which, when applied to a Python `datetime` value at the start of the run, produces the name of the log file. The default value of this string is backwards-compatible with prior User Sync behavior. See [the docs](https://adobe-apiplatform.github.io/user-sync.py/en/user-manual/configuring_user_sync_tool.html#configure-logging) for details.
11+
[#385](https://github.com/adobe-apiplatform/user-sync.py/issues/385) Support for users that have a different email-type username and email address. Users of this type are synced by specifying both a `user_username_format` and `user_email_format` in `connector-ldap.yml`. The username field must contain only email-type usernames. Users with alphanumeric usernames will not be synced. See the "Advanced Configuration" section of the User Manual for more information.
1212

13-
[#299](https://github.com/adobe-apiplatform/user-sync.py/issues/299) You can now use an `invocation_defaults` section to specify desired values for command-line arguments in the main configuration file. This can make it a lot easier to repeat runs with a stable set of arguments, even when running interactively rather than from a script. The sample main configuration file specifies the configuration parameters to use as well as the syntax for specifying values. See [the docs](https://adobe-apiplatform.github.io/user-sync.py/en/user-manual/command_parameters.html) for full details.
13+
[#339](https://github.com/adobe-apiplatform/user-sync.py/issues/339) Dynamic mapping of additional groups and automatic group creation. Introduces an optional config option to identify additional groups that a user directly belongs to. Additional groups are matched with a list of one or more regular expressions. These groups can be dynamically mapped to Adobe groups using regular expression substitution strings. In addition, Adobe groups targeted by this method, as well as the standard mapping or extension config, can be automatically created by the sync tool. New groups are created as user groups. See the documentation for more details.
1414

15-
[#322](https://github.com/adobe-apiplatform/user-sync.py/issues/322), [#319](https://github.com/adobe-apiplatform/user-sync.py/issues/319) As it has been with email, you can now use formatted combinations of ldap/okta attributes for the Adobe-side first name, last name, and country. (See the sample configuration files for details.) You can also specify the country code in lower case.
15+
[#405](https://github.com/adobe-apiplatform/user-sync.py/pull/405) Additional enhancements and fixes to group sync
16+
* Log "additional group" rule mapping
17+
* Don't allow multiple source rules to map to same target group
18+
* Catch regex substitution errors
19+
* Remove some superfluous and confusing checks
20+
* Secondary org support
1621

17-
## Bug Fixes
22+
# Bug Fixes
1823

19-
[#305](https://github.com/adobe-apiplatform/user-sync.py/issues/305) General issues with Okta connector.
24+
[#379](https://github.com/adobe-apiplatform/user-sync.py/issues/379) --user-filter and invocation default
2025

21-
[#306](https://github.com/adobe-apiplatform/user-sync.py/issues/306) v2.2.2 crashes if country code not specified.
26+
[#381](https://github.com/adobe-apiplatform/user-sync.py/issues/381) Invocation Defaults doesn't work for "--users file"
27+
* Not actually a bug, but `user-sync-config.yml` was updated to clarify how to specify user input file in `invocation_defaults`
2228

23-
[#308](https://github.com/adobe-apiplatform/user-sync.py/issues/308) docs are unclear about how to set PEX_ROOT.
29+
[#396](https://github.com/adobe-apiplatform/user-sync.py/issues/396) LDAP error when running user-sync-v2.4rc1-win64-py2715
2430

25-
[#314](https://github.com/adobe-apiplatform/user-sync.py/issues/314) invocation_defaults section should be optional.
31+
# Documentation Updates
2632

27-
[#315](https://github.com/adobe-apiplatform/user-sync.py/issues/315) Can't specify --user-filter or other string-valued args.
33+
[#403](https://github.com/adobe-apiplatform/user-sync.py/issues/403) Add documentation for Azure AD / UST
2834

29-
[#318](https://github.com/adobe-apiplatform/user-sync.py/issues/318) Fix the README build instructions regarding dbus.
35+
[#426](https://github.com/adobe-apiplatform/user-sync.py/pull/426) Ergonomic tweaks to template configs
36+
* Removed Number from the sample template
37+
* Connector-umapi.yml
38+
- set private key path to just private.key
39+
* Connector-ldap.yml
40+
- set page size to 1000 (Active Directory Default)
41+
- user\_username\_format example to just {sAMAccountName}
42+
* User-Sync-Config.yml
43+
- Default to FederatedID
44+
- Tweaked the example to match with current use case
45+
- Enable Logging by Default
46+
- Default Invocation - Set to Process-group and Users Mapped to avoid accidentally directory dump to Admin console.
3047

31-
[#324](https://github.com/adobe-apiplatform/user-sync.py/issues/324) Handle LDAP servers with no support for PagedResults.
48+
# Compatibility with Prior Versions
3249

33-
[#325](https://github.com/adobe-apiplatform/user-sync.py/issues/325) Adding '--process-groups' doesn't override the default.
50+
All configuration and command-line arguments accepted in prior releases work in this release.
3451

35-
[#364](https://github.com/adobe-apiplatform/user-sync.py/issues/364) Okta decode error
52+
# Known Issues
3653

37-
[#365](https://github.com/adobe-apiplatform/user-sync.py/issues/365) Using adobe-only-user-list does not work
54+
Python 3.7 is not supported at this time. See #376.
3855

39-
## Compatibility with Prior Versions
56+
[#384](https://github.com/adobe-apiplatform/user-sync.py/issues/384) UMAPI returns truncated group list for users assigned to a large amount of groups. This doesn't prevent the new additional group functionality from working, but it does result in unnecessary API calls to assign users to groups they already may belong to.
4057

41-
All configuration and command-line arguments accepted in prior releases work in this release. The `--users file` argument is still accepted, and is equivalent to (although more limited than) specifying `--connector csv`.
58+
# Additional Build Information
4259

43-
## Known Issues
44-
45-
On the Win64 platform, there are very long pathnames embedded in the released build artifact `user-sync.pex`, which will cause problems unless you are on Windows 10 and are either running Python 3.6 or have enabled long pathnames system-wide (as described in this [Microsoft Dev Center article](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx)). To work around this issue on older platforms, set the `PEX_ROOT` environment variable (as described [in the docs here](https://adobe-apiplatform.github.io/user-sync.py/en/user-manual/setup_and_installation.html)) to be a very short path (e.g., `set PEX_ROOT=C:\pex`).
46-
47-
Each release on each platform is built with a specific version of Python. Typically this is the latest available for that platform (from the OS vendor, if they provide one, from [python.org](http://python.org) otherwise). In general, and especially on Windows, you should use the same Python to run User Sync as it was built with.
48-
49-
## Additional Build Information
50-
51-
User Sync is now built with PyLDAP 2.4.45.
52-
53-
User Sync is now built with umapi_client 2.10. This allows mocking the UMAPI connection for use with a test framework. See the test_framework directory in the source tree for more details.
60+
User Sync is now built with umapi\_client 2.12, which supports the following new features
61+
* Add new user groups
62+
* Update existing user groups
63+
* Delete user groups
64+
* Create users with different email-type usernames and email addresses

appveyor.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ install:
99
build_script:
1010
- ps: .appveyor\build.ps1
1111

12+
test_script:
13+
- ps: .appveyor\test.ps1
14+
1215
artifacts:
1316
- path: release/*.zip
1417
name: Zips

nose.cfg

Lines changed: 0 additions & 3 deletions
This file was deleted.

setup.cfg

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[aliases]
2-
test=nosetests
2+
test=pytest
33

4-
[nosetests]
5-
verbosity=3
6-
with-doctest=1
4+
[tool:pytest]
5+
addopts = --cov=user_sync

0 commit comments

Comments
 (0)