Showing preview only (1,704K chars total). Download the full file or copy to clipboard to get everything.
Repository: cmdmnt/commandment
Branch: master
Commit: 17c1dbe3f530
Files: 573
Total size: 1.5 MB
Directory structure:
gitextract_jp6y57tz/
├── .circleci/
│ └── config.yml
├── .docker/
│ ├── Dockerfile
│ ├── entry.sh
│ ├── nginx.conf
│ ├── openssl.cnf
│ ├── settings.cfg.docker
│ ├── supervisord.conf
│ ├── uwsgi-commandment.ini
│ └── uwsgi.ini
├── .dockerignore
├── .gitignore
├── .gitlab-ci.yml
├── LICENSE.txt
├── Pipfile
├── README.rst
├── alembic.ini
├── assets/
│ └── logo.afdesign
├── commandment/
│ ├── __init__.py
│ ├── ac2/
│ │ ├── __init__.py
│ │ └── ac2_app.py
│ ├── alembic/
│ │ ├── __init__.py
│ │ ├── disabled_versions/
│ │ │ ├── 072fba4a2256_create_ad_payload_table.py
│ │ │ ├── 18412434fb57_create_energy_saver_payload_table.py
│ │ │ ├── 323a90039a6a_create_email_payload_table.py
│ │ │ ├── 4eddbcb30464_create_mdm_payload_table.py
│ │ │ ├── 8186b8ecf0fc_create_ad_cert_payload_table.py
│ │ │ ├── 9dd4e48235e3_create_vpn_payload_table.py
│ │ │ ├── d65049bf4b91_create_wifi_payload_table.py
│ │ │ ├── da52b64b865f_create_apps_table.py
│ │ │ ├── e47e29a9537c_create_certificate_payload_table.py
│ │ │ └── fc0c134cbb2e_create_password_policy_payload_table.py
│ │ ├── env.py
│ │ ├── script.py.mako
│ │ └── versions/
│ │ ├── 0201b96ab856_add_ios_available_os_updates_fields.py
│ │ ├── 0ab46b2f6d8c_create_users_table.py
│ │ ├── 0c4c448f4daf_create_device_users_table.py
│ │ ├── 0e5babc5b9ee_create_vpp_licenses.py
│ │ ├── 1005dc7dea01_os_update_settings.py
│ │ ├── 13358fb3846b_create_subject_alternative_names_table.py
│ │ ├── 1532dff16984_drop_device_groups.py
│ │ ├── 2808deb9fc62_create_dep_configurations.py
│ │ ├── 2f1507bf6dc1_create_application_manifests_table.py
│ │ ├── 3061e56045eb_create_certificate_authority.py
│ │ ├── 3dbf6db7f9eb_application_tags.py
│ │ ├── 3fb4a904979c_general_cleanup.py
│ │ ├── 50188ffaf0cd_create_devices_table.py
│ │ ├── 5b98cc4af6c9_create_profiles_table.py
│ │ ├── 6675e981817e_create_available_os_updates_table.py
│ │ ├── 70ff84113e8f_create_tags.py
│ │ ├── 71818e983100_create_application_sources_table.py
│ │ ├── 71ecf957301a_create_commands_table.py
│ │ ├── 7ab500f58a76_create_installed_payloads.py
│ │ ├── 7cf5787a089e_add_dep_profile_relationships.py
│ │ ├── 7d578eb75092_create_device_groups_table.py
│ │ ├── 80fa1767c7e2_create_oauth_server_models.py
│ │ ├── 875dcce0bf8b_create_vpp_users.py
│ │ ├── 8c866896f76e_create_dep_join_tables.py
│ │ ├── __init__.py
│ │ ├── a1d5ffaa2092_create_installed_applications_table.py
│ │ ├── a2e0af380181_create_dep_profiles.py
│ │ ├── a35eeb5a216e_create_installed_profiles_table.py
│ │ ├── a3ddaad5c358_add_dep_device_columns.py
│ │ ├── af4ba256efde_create_certificates_table.py
│ │ ├── b231394ab475_add_scep_config_source_types.py
│ │ ├── b74ca08cfd9a_create_applications_tables.py
│ │ ├── ba4849d8c8ad_create_device_group_devices_table.py
│ │ ├── d5b32b5cc74e_add_dep_profile_id_to_device.py
│ │ ├── dd74229d17b9_create_payload_dependencies_table.py
│ │ ├── e16577adc4fd_create_installed_certificates_table.py
│ │ ├── e5840df9a88a_create_scep_payload_table.py
│ │ ├── e58afdc17baa_create_rsa_private_keys_table.py
│ │ ├── e78274be170e_create_organizations_table.py
│ │ ├── e947cdf82307_add_ios_installed_application_fields.py
│ │ ├── e9b0a4f7b595_create_payloads_table.py
│ │ ├── ea34ae3f1e7e_create_profile_payloads_table.py
│ │ ├── f029ac1af3f0_create_vpp_accounts.py
│ │ ├── f5237c7e2374_create_scep_config_table.py
│ │ ├── f8eb70b3aa2b_create_application_manifests.py
│ │ └── fa4d91c6aacf_create_managed_applications_table.py
│ ├── api/
│ │ ├── __init__.py
│ │ ├── app_json.py
│ │ ├── app_jsonapi.py
│ │ ├── configuration.py
│ │ ├── resources.py
│ │ └── schema.py
│ ├── apns/
│ │ ├── __init__.py
│ │ ├── app.py
│ │ ├── mdmcert.py
│ │ ├── push.py
│ │ ├── schema.py
│ │ └── threads.py
│ ├── app.py
│ ├── apps/
│ │ ├── __init__.py
│ │ ├── app_jsonapi.py
│ │ ├── models.py
│ │ ├── resources.py
│ │ └── schema.py
│ ├── auth/
│ │ ├── __init__.py
│ │ ├── app.py
│ │ ├── models.py
│ │ └── oauth2.py
│ ├── cli.py
│ ├── cms/
│ │ ├── __init__.py
│ │ └── decorators.py
│ ├── dbtypes.py
│ ├── decorators.py
│ ├── default_settings.py
│ ├── dep/
│ │ ├── __init__.py
│ │ ├── app.py
│ │ ├── apple_schema.py
│ │ ├── cli.py
│ │ ├── dep.py
│ │ ├── errors.py
│ │ ├── models.py
│ │ ├── resources.py
│ │ ├── schema.py
│ │ ├── smime.py
│ │ └── threads.py
│ ├── deprecated/
│ │ ├── models.py
│ │ └── schema.py
│ ├── enroll/
│ │ ├── __init__.py
│ │ ├── app.py
│ │ ├── profiles.py
│ │ └── util.py
│ ├── errors.py
│ ├── inventory/
│ │ ├── __init__.py
│ │ ├── api.py
│ │ ├── models.py
│ │ ├── resources.py
│ │ └── schema.py
│ ├── mdm/
│ │ ├── __init__.py
│ │ ├── api.py
│ │ ├── app.py
│ │ ├── commands.py
│ │ ├── decorators.py
│ │ ├── handlers.py
│ │ ├── models.py
│ │ ├── resources.py
│ │ ├── response_schema.py
│ │ ├── routers.py
│ │ ├── schema.py
│ │ └── util.py
│ ├── models.py
│ ├── mutablelist.py
│ ├── omdm/
│ │ ├── __init__.py
│ │ └── models.py
│ ├── pkg/
│ │ ├── __init__.py
│ │ ├── appmanifest.py
│ │ ├── manifest.py
│ │ ├── old_app_manifest.py
│ │ └── schema.py
│ ├── pki/
│ │ ├── ca.py
│ │ ├── models.py
│ │ ├── openssl.py
│ │ ├── ormutils.py
│ │ ├── serialization.py
│ │ └── ssl.py
│ ├── plistutil/
│ │ ├── __init__.py
│ │ └── nonewriter.py
│ ├── profiles/
│ │ ├── __init__.py
│ │ ├── ad.py
│ │ ├── api.py
│ │ ├── certificates.py
│ │ ├── eap.py
│ │ ├── email.py
│ │ ├── energy.py
│ │ ├── models.py
│ │ ├── plist_schema.py
│ │ ├── resources.py
│ │ ├── schema.py
│ │ ├── vpn.py
│ │ └── wifi.py
│ ├── signals.py
│ ├── static/
│ │ ├── .gitignore
│ │ ├── index.dev.html
│ │ └── index.html
│ ├── storage/
│ │ └── .gitignore
│ ├── templates/
│ │ └── index.html
│ ├── threads/
│ │ ├── __init__.py
│ │ ├── startup_thread.py
│ │ └── vpp_thread.py
│ ├── utils.py
│ └── vpp/
│ ├── __init__.py
│ ├── app.py
│ ├── cli.py
│ ├── decorators.py
│ ├── enum.py
│ ├── errors.py
│ ├── models.py
│ ├── schema.py
│ └── vpp.py
├── doc/
│ ├── .gitignore
│ ├── Makefile
│ ├── _static/
│ │ ├── config/
│ │ │ ├── nginx-commandment.conf
│ │ │ └── uwsgi-commandment.ini
│ │ └── uml/
│ │ ├── checkin.puml
│ │ ├── commandqueue.puml
│ │ └── models/
│ │ ├── Certificate.plantuml
│ │ ├── Command.plantuml
│ │ ├── InstalledApplication.plantuml
│ │ ├── InstalledCertificate.plantuml
│ │ └── InstalledProfile.plantuml
│ ├── about-mdm.rst
│ ├── api/
│ │ ├── certificates.rst
│ │ ├── commands.rst
│ │ ├── dep.rst
│ │ ├── devices.rst
│ │ ├── index.rst
│ │ └── organization.rst
│ ├── conf.py
│ ├── dev/
│ │ └── MUSINGS.rst
│ ├── developer/
│ │ ├── guide/
│ │ │ ├── architecture.rst
│ │ │ ├── building.rst
│ │ │ ├── index.rst
│ │ │ └── running.rst
│ │ ├── index.rst
│ │ └── microservices.rst
│ ├── guides/
│ │ ├── INSTALL.md
│ │ ├── nginx.rst
│ │ └── scep.rst
│ ├── index.rst
│ ├── installing/
│ │ ├── index.rst
│ │ ├── install.rst
│ │ ├── macos.rst
│ │ └── ubuntu-server.rst
│ ├── internal/
│ │ ├── api/
│ │ │ ├── api.rst
│ │ │ ├── index.rst
│ │ │ └── json-api.rst
│ │ ├── cms/
│ │ │ ├── decorators.rst
│ │ │ └── index.rst
│ │ ├── core/
│ │ │ ├── index.rst
│ │ │ ├── models/
│ │ │ │ ├── certificate.rst
│ │ │ │ ├── certificate_request.rst
│ │ │ │ ├── command.rst
│ │ │ │ ├── device.rst
│ │ │ │ ├── index.rst
│ │ │ │ ├── installed_application.rst
│ │ │ │ ├── installed_certificate.rst
│ │ │ │ ├── installed_profile.rst
│ │ │ │ ├── organization.rst
│ │ │ │ ├── profile.rst
│ │ │ │ └── rsa_private_key.rst
│ │ │ └── signals.rst
│ │ ├── decorators.rst
│ │ ├── dep/
│ │ │ ├── dep.rst
│ │ │ ├── index.rst
│ │ │ ├── models.rst
│ │ │ └── types.rst
│ │ ├── enroll/
│ │ │ ├── app.rst
│ │ │ └── index.rst
│ │ ├── flask/
│ │ │ ├── configuration.rst
│ │ │ └── index.rst
│ │ ├── index.rst
│ │ ├── mdm/
│ │ │ ├── app.rst
│ │ │ ├── handlers.rst
│ │ │ ├── index.rst
│ │ │ └── types.rst
│ │ ├── push.rst
│ │ ├── vpp/
│ │ │ ├── decorators.rst
│ │ │ ├── enum.rst
│ │ │ ├── errors.rst
│ │ │ ├── index.rst
│ │ │ ├── operations.rst
│ │ │ └── vpp.rst
│ │ └── workers/
│ │ ├── index.rst
│ │ └── runner.rst
│ ├── make.bat
│ ├── sadisplay/
│ │ └── models.py
│ └── user/
│ ├── configuration.rst
│ ├── dep.rst
│ └── index.rst
├── docker-compose.yml
├── mypy.ini
├── pytest.ini
├── settings.cfg.example
├── setup.cfg
├── setup.py
├── testdata/
│ ├── Authenticate/
│ │ ├── 10.11.x.xml
│ │ ├── 10.12.2.xml
│ │ ├── IOS-11.3.1.xml
│ │ ├── IOS-9.x.xml
│ │ └── iOS-11.3.1-cell.xml
│ ├── AvailableOSUpdates/
│ │ ├── 10.12.5.xml
│ │ ├── iOS-11.3.1.xml
│ │ └── macOS-10.13.1.xml
│ ├── CertificateList/
│ │ ├── 10.11.x.xml
│ │ └── iOS-11.3.1.xml
│ ├── CheckOut/
│ │ ├── 10.11.x.xml
│ │ └── iOS-11.3.1.xml
│ ├── DeviceInformation/
│ │ ├── 10.11.x.xml
│ │ ├── iOS-11.3.1.xml
│ │ └── macOS-10.13.1.xml
│ ├── DeviceLock/
│ │ └── iOS-11.3.1.xml
│ ├── Errors/
│ │ ├── 10.12.5-invalid-command.xml
│ │ ├── 10.13.6-invalid-command.xml
│ │ ├── error_invalid_request_type.plist
│ │ ├── iOS-11.3.1-AvailableOSUpdatesFailure.xml
│ │ ├── iOS-11.3.1-CommandFormatError.xml
│ │ └── iOS-11.3.1-RemoveProfile-Unmanaged.xml
│ ├── InstallApplication/
│ │ ├── iOS-11.3.1-alreadyprompting.xml
│ │ ├── iOS-12.1-prompting.xml
│ │ └── manifests/
│ │ ├── Microsoft_AutoUpdate-3.11.17101000.plist
│ │ ├── OneDrive-17.3.7078.1101.plist
│ │ ├── SkypeForBusinessInstaller-16.12.0.77.plist
│ │ ├── dotnet-sdk-2.0.2-osx-x64.plist
│ │ └── munkitools-3.1.0.3430.plist
│ ├── InstalledApplicationList/
│ │ ├── 10.11.x.xml
│ │ ├── iOS-11.3.1.xml
│ │ └── iOS-12.1.xml
│ ├── ManagedApplicationList/
│ │ ├── iOS-11.3.1-Failed.xml
│ │ ├── iOS-12.1-Failed.xml
│ │ ├── iOS-12.1-Installing.xml
│ │ ├── iOS-12.1-Managed.xml
│ │ └── iOS-12.1-RejectedPrompting.xml
│ ├── NotNow/
│ │ └── iOS-11.3.1.xml
│ ├── ProfileList/
│ │ ├── 10.11.x.xml
│ │ └── iOS-11.3.1.xml
│ ├── README.rst
│ ├── SecurityInfo/
│ │ ├── 10.11.x.xml
│ │ ├── IOS-9.x.xml
│ │ ├── iOS-11.3.1.xml
│ │ └── macOS-10.13.1.xml
│ ├── TokenUpdate/
│ │ ├── 10.11.x-user.plist
│ │ ├── 10.11.x.plist
│ │ ├── 10.12.2-user.xml
│ │ ├── 10.12.2.xml
│ │ └── iOS-11.3.1.xml
│ ├── decrypt_dep_token.sh
│ ├── dep/
│ │ └── profile.xml
│ ├── itunes/
│ │ ├── ios-search-slack.json
│ │ └── mas-search-slack.json
│ └── mdmclient-PKIOperation.der
├── tests/
│ ├── __init__.py
│ ├── alembic_test.ini
│ ├── api/
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ └── test_devices.py
│ ├── client.py
│ ├── conftest.py
│ ├── dep/
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ ├── test_dep.py
│ │ ├── test_dep_app.py
│ │ ├── test_dep_failures.py
│ │ ├── test_dep_live.py
│ │ └── test_smime.py
│ ├── mdm/
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ ├── test_available_os_updates.py
│ │ ├── test_certificate_list.py
│ │ ├── test_checkin.py
│ │ ├── test_device_information.py
│ │ ├── test_installed_application_list.py
│ │ ├── test_profile_list.py
│ │ └── test_security_info.py
│ ├── pkg/
│ │ └── __init__.py
│ ├── pki/
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ ├── test_ca.py
│ │ ├── test_models.py
│ │ ├── test_openssl.py
│ │ └── test_ormutils.py
│ ├── test_api_flat.py
│ ├── test_mdmcert.py
│ ├── threads/
│ │ ├── __init__.py
│ │ └── test_startup_thread.py
│ └── vpp/
│ ├── __init__.py
│ ├── conftest.py
│ └── vpp_test.py
├── travis-ci-settings.cfg
└── ui/
├── .eslintrc.js
├── .gitignore
├── .storybook/
│ ├── config.js
│ ├── preview-head.html
│ └── webpack.config.js
├── _deprecated/
│ ├── AssistantPage.tsx
│ ├── DeviceGroupPage.tsx
│ ├── DeviceGroupsPage.tsx
│ ├── InternalCAPage.tsx
│ ├── MDMPage.tsx
│ ├── SCEPConfigurationForm.tsx
│ ├── SSLPage.tsx
│ └── assistant/
│ ├── APNSConfiguration.tsx
│ ├── FinalStep.tsx
│ ├── SCEPConfiguration.tsx
│ └── SSLConfiguration.tsx
├── babel.config.js
├── package.json
├── sass/
│ ├── _dropzone.scss
│ ├── _helper.scss
│ ├── _nav.scss
│ ├── _settings.scss
│ ├── _upload.scss
│ └── app.scss
├── src/
│ ├── @types/
│ │ ├── byte-size/
│ │ │ └── index.d.ts
│ │ └── redux-api-middleware/
│ │ └── index.d.ts
│ ├── components/
│ │ ├── ActionMenu.tsx
│ │ ├── App.tsx
│ │ ├── BareLayout.tsx
│ │ ├── CertificateTypeIcon.tsx
│ │ ├── CheckListItem.tsx
│ │ ├── DeviceActions.tsx
│ │ ├── Navigation.scss
│ │ ├── Navigation.tsx
│ │ ├── NavigationLayout.tsx
│ │ ├── NavigationVertical.tsx
│ │ ├── ProtectedRoute.tsx
│ │ ├── RSAAApiErrorMessage.tsx
│ │ ├── SearchInput.tsx
│ │ ├── TagDropdown.tsx
│ │ ├── devices/
│ │ │ ├── DEPDeviceDetail.tsx
│ │ │ ├── IOSDeviceDetail.tsx
│ │ │ ├── MacOSDeviceDetail.scss
│ │ │ ├── MacOSDeviceDetail.tsx
│ │ │ └── ModelIcon.tsx
│ │ ├── errors/
│ │ │ └── ApiError.tsx
│ │ ├── formik/
│ │ │ └── FormikCheckbox.tsx
│ │ ├── forms/
│ │ │ ├── DEPAccountForm.tsx
│ │ │ ├── DEPProfileForm.tsx
│ │ │ ├── DeviceAuthForm.tsx
│ │ │ └── OrganizationForm.tsx
│ │ ├── itunes/
│ │ │ └── MASResult.tsx
│ │ ├── modals/
│ │ │ ├── DeviceRenameModal.tsx
│ │ │ └── ProfileUploadModal.tsx
│ │ ├── react-table/
│ │ │ ├── AppName.tsx
│ │ │ ├── ApplicationType.tsx
│ │ │ ├── ByteSize.tsx
│ │ │ ├── CommandStatus.tsx
│ │ │ ├── DEPAccountServerName.tsx
│ │ │ ├── DEPProfileName.tsx
│ │ │ ├── DeviceName.tsx
│ │ │ ├── ObjectLink.tsx
│ │ │ ├── ProfileName.tsx
│ │ │ ├── RelativeToNow.tsx
│ │ │ └── SUISelectionTools.tsx
│ │ ├── react-tables/
│ │ │ ├── AppDeployStatusTable.tsx
│ │ │ ├── ApplicationsTable.tsx
│ │ │ ├── DEPAccountsTable.tsx
│ │ │ ├── DEPProfilesTable.tsx
│ │ │ ├── DeviceApplicationsTable.tsx
│ │ │ ├── DeviceCertificatesTable.tsx
│ │ │ ├── DeviceCommandsTable.tsx
│ │ │ ├── DeviceProfilesTable.tsx
│ │ │ ├── DeviceUpdatesTable.tsx
│ │ │ ├── DevicesTable.tsx
│ │ │ └── ProfilesTable.tsx
│ │ ├── semantic-ui/
│ │ │ ├── ButtonLink.tsx
│ │ │ └── MenuItemLink.tsx
│ │ └── vpp/
│ │ └── VPPAccountDetail.tsx
│ ├── constants.ts
│ ├── containers/
│ │ ├── AppStorePage.tsx
│ │ ├── ApplicationPage.tsx
│ │ ├── ApplicationsPage.tsx
│ │ ├── DEPAccountPage.tsx
│ │ ├── DEPProfilePage.tsx
│ │ ├── DashboardPage.tsx
│ │ ├── DevicePage.tsx
│ │ ├── DeviceRename.tsx
│ │ ├── DevicesPage.tsx
│ │ ├── LoginPage.tsx
│ │ ├── LogoutPage.tsx
│ │ ├── ProfilePage.tsx
│ │ ├── ProfileUpload.tsx
│ │ ├── ProfilesPage.tsx
│ │ ├── SettingsPage.tsx
│ │ ├── applications/
│ │ │ ├── ApplicationDeviceStatus.tsx
│ │ │ └── MacOSEntApplicationPage.tsx
│ │ ├── config/
│ │ │ ├── DeviceAuthPage.tsx
│ │ │ └── OrganizationPage.tsx
│ │ ├── devices/
│ │ │ ├── DeviceApplications.tsx
│ │ │ ├── DeviceCertificates.tsx
│ │ │ ├── DeviceCommands.tsx
│ │ │ ├── DeviceDetail.tsx
│ │ │ ├── DeviceOSUpdates.tsx
│ │ │ └── DeviceProfiles.tsx
│ │ └── settings/
│ │ ├── APNSPage.tsx
│ │ ├── DEPAccountSetupPage.tsx
│ │ ├── DEPAccountsPage.tsx
│ │ └── VPPAccountsPage.tsx
│ ├── entry.tsx
│ ├── flask-rest-jsonapi.ts
│ ├── forms/
│ │ ├── ApplicationForm.tsx
│ │ └── DeviceGroupForm.tsx
│ ├── guards.ts
│ ├── hooks/
│ │ └── useForm.ts
│ ├── json-api-v1.ts
│ ├── models.ts
│ ├── reducers/
│ │ ├── index.ts
│ │ └── interfaces.ts
│ ├── selectors/
│ │ └── device.ts
│ ├── store/
│ │ ├── applications/
│ │ │ ├── actions.ts
│ │ │ ├── itunes.ts
│ │ │ ├── list_reducer.ts
│ │ │ ├── managed.ts
│ │ │ ├── managed_reducer.ts
│ │ │ ├── reducer.ts
│ │ │ └── types.ts
│ │ ├── assistant/
│ │ │ ├── actions.ts
│ │ │ └── reducer.ts
│ │ ├── auth/
│ │ │ ├── actions.ts
│ │ │ ├── reducer.ts
│ │ │ └── types.ts
│ │ ├── certificates/
│ │ │ ├── actions.ts
│ │ │ ├── ca_actions.ts
│ │ │ ├── ca_reducer.ts
│ │ │ ├── push_actions.ts
│ │ │ ├── push_reducer.ts
│ │ │ ├── reducer.ts
│ │ │ ├── ssl_actions.ts
│ │ │ ├── ssl_reducer.ts
│ │ │ └── types.ts
│ │ ├── commands/
│ │ │ ├── actions.ts
│ │ │ └── reducer.ts
│ │ ├── configuration/
│ │ │ ├── apns_reducer.ts
│ │ │ ├── mdmcert_actions.ts
│ │ │ ├── reducer.ts
│ │ │ ├── scep_actions.ts
│ │ │ ├── scep_reducer.ts
│ │ │ ├── types.ts
│ │ │ ├── vpp.ts
│ │ │ └── vpp_reducer.ts
│ │ ├── configureStore.ts
│ │ ├── constants.ts
│ │ ├── dep/
│ │ │ ├── account_reducer.ts
│ │ │ ├── accounts_reducer.ts
│ │ │ ├── actions.ts
│ │ │ ├── profile_reducer.ts
│ │ │ ├── profiles_reducer.ts
│ │ │ ├── reducer.ts
│ │ │ └── types.ts
│ │ ├── device/
│ │ │ ├── actions.ts
│ │ │ ├── applications.ts
│ │ │ ├── available_os_updates_reducer.ts
│ │ │ ├── certificates.ts
│ │ │ ├── commands_reducer.ts
│ │ │ ├── installed_applications_reducer.ts
│ │ │ ├── installed_certificates_reducer.ts
│ │ │ ├── installed_profiles_reducer.ts
│ │ │ ├── profiles.ts
│ │ │ ├── reducer.ts
│ │ │ ├── types.ts
│ │ │ └── updates.ts
│ │ ├── device_groups/
│ │ │ ├── actions.ts
│ │ │ ├── reducer.ts
│ │ │ └── types.ts
│ │ ├── devices/
│ │ │ ├── actions.ts
│ │ │ └── devices.ts
│ │ ├── json-api.ts
│ │ ├── mdm.ts
│ │ ├── organization/
│ │ │ ├── actions.ts
│ │ │ ├── reducer.ts
│ │ │ └── types.ts
│ │ ├── pki/
│ │ │ ├── actions.ts
│ │ │ └── types.ts
│ │ ├── profile/
│ │ │ └── reducer.ts
│ │ ├── profiles/
│ │ │ ├── actions.ts
│ │ │ ├── reducer.ts
│ │ │ └── types.ts
│ │ ├── redux-api-middleware.ts
│ │ ├── table/
│ │ │ ├── actions.ts
│ │ │ ├── reducer.ts
│ │ │ └── types.ts
│ │ └── tags/
│ │ ├── actions.ts
│ │ ├── reducer.ts
│ │ └── types.ts
│ └── stories/
│ ├── DEPProfileForm.tsx
│ ├── index.ts
│ └── redux.tsx
├── tsconfig.json
├── tslint.json
├── webpack.config.hmr.js
├── webpack.config.js
└── webpack.config.prod.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .circleci/config.yml
================================================
version: 2
jobs:
build:
docker:
- image: circleci/ruby:2.4.1
steps:
- checkout
- run: echo "A first hello"
================================================
FILE: .docker/Dockerfile
================================================
FROM python:3.6
# Adapted from tiangolo-uwsgi-flask (https://github.com/tiangolo/uwsgi-nginx-flask-docker) or
# (https://github.com/tiangolo/uwsgi-nginx-docker/blob/master/python3.6/Dockerfile)
ENV NGINX_VERSION 1.13.12-1~stretch
ENV NJS_VERSION 1.13.12.0.2.0-1~stretch
RUN set -x \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y gnupg1 apt-transport-https ca-certificates \
&& \
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
found=''; \
for server in \
ha.pool.sks-keyservers.net \
hkp://keyserver.ubuntu.com:80 \
hkp://p80.pool.sks-keyservers.net:80 \
pgp.mit.edu \
; do \
echo "Fetching GPG key $NGINX_GPGKEY from $server"; \
apt-key adv --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$NGINX_GPGKEY" && found=yes && break; \
done; \
test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
apt-get remove --purge --auto-remove -y gnupg1 && rm -rf /var/lib/apt/lists/* \
&& dpkgArch="$(dpkg --print-architecture)" \
&& nginxPackages=" \
nginx=${NGINX_VERSION} \
" \
&& case "$dpkgArch" in \
amd64|i386) \
# arches officialy built by upstream
echo "deb https://nginx.org/packages/mainline/debian/ stretch nginx" >> /etc/apt/sources.list.d/nginx.list \
&& apt-get update \
;; \
*) \
# we're on an architecture upstream doesn't officially build for
# let's build binaries from the published source packages
echo "deb-src https://nginx.org/packages/mainline/debian/ stretch nginx" >> /etc/apt/sources.list.d/nginx.list \
\
# new directory for storing sources and .deb files
&& tempDir="$(mktemp -d)" \
&& chmod 777 "$tempDir" \
# (777 to ensure APT's "_apt" user can access it too)
\
# save list of currently-installed packages so build dependencies can be cleanly removed later
&& savedAptMark="$(apt-mark showmanual)" \
\
# build .deb files from upstream's source packages (which are verified by apt-get)
&& apt-get update \
&& apt-get build-dep -y $nginxPackages \
&& ( \
cd "$tempDir" \
&& DEB_BUILD_OPTIONS="nocheck parallel=$(nproc)" \
apt-get source --compile $nginxPackages \
) \
# we don't remove APT lists here because they get re-downloaded and removed later
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
# (which is done after we install the built packages so we don't have to redownload any overlapping dependencies)
&& apt-mark showmanual | xargs apt-mark auto > /dev/null \
&& { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \
\
# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be)
&& ls -lAFh "$tempDir" \
&& ( cd "$tempDir" && dpkg-scanpackages . > Packages ) \
&& grep '^Package: ' "$tempDir/Packages" \
&& echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list \
# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes")
# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied)
# ...
# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied)
&& apt-get -o Acquire::GzipIndexes=false update \
;; \
esac \
\
&& apt-get install --no-install-recommends --no-install-suggests -y \
$nginxPackages \
gettext-base \
&& rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/nginx.list \
\
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
&& if [ -n "$tempDir" ]; then \
apt-get purge -y --auto-remove \
&& rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
fi
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
EXPOSE 80 443
# Standard set up Nginx finished
# Install uWSGI
RUN pip install uwsgi
# Make NGINX run on the foreground
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
# Remove default configuration from Nginx
RUN rm /etc/nginx/conf.d/default.conf
# Copy the modified Nginx conf
COPY .docker/nginx.conf /etc/nginx/conf.d/
# Copy the base uWSGI ini file to enable default dynamic uwsgi process number
COPY .docker/uwsgi.ini /etc/uwsgi/
# Install Supervisord
RUN apt-get update && apt-get install -y supervisor sqlite3 libsqlite3-dev uwsgi-plugin-python3 \
&& rm -rf /var/lib/apt/lists/*
# Custom Supervisord config
COPY .docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Which uWSGI .ini file should be used, to make it customizable
# ENV UWSGI_INI /commandment/uwsgi.ini
# By default, run 2 processes
ENV UWSGI_CHEAPER 2
# By default, when on demand, run up to 16 processes
ENV UWSGI_PROCESSES 16
# By default, allow unlimited file sizes, modify it to limit the file sizes
# To have a maximum of 1 MB (Nginx's default) change the line to:
# ENV NGINX_MAX_UPLOAD 1m
ENV NGINX_MAX_UPLOAD 0
# By default, Nginx will run a single worker process, setting it to auto
# will create a worker for each CPU core
ENV NGINX_WORKER_PROCESSES 1
# By default, Nginx listens on port 80.
# To modify this, change LISTEN_PORT environment variable.
# (in a Dockerfile or with an option for `docker run`)
ENV LISTEN_PORT 80
COPY . /commandment
WORKDIR /commandment
RUN pip install pipenv
RUN pipenv install --system
COPY .docker/uwsgi-commandment.ini /etc/uwsgi/uwsgi-commandment.ini
COPY .docker/entry.sh /entry.sh
COPY .docker/settings.cfg.docker /settings.cfg
CMD ["/entry.sh"]
================================================
FILE: .docker/entry.sh
================================================
#!/usr/bin/env bash
echo "Starting commandment..."
SSL_HOSTNAME=${SSL_HOSTNAME:-"commandment.test"}
PYTHONPATH=/commandment
export PYTHONPATH
#echo "Initialising database..."
#touch /commandment/commandment.db
#/usr/local/bin/alembic --config /commandment/alembic.ini -x data=true upgrade head
if [[ ! -f /etc/nginx/ssl/ssl.crt || ! -f /etc/nginx/ssl.key ]]; then
echo "Did not find any SSL certificate to use. SSL is required for MDM."
echo "Creating new certificate using environment with DNSName: ${SSL_HOSTNAME}"
cat <<- EOF > /tmp/openssl.cnf
[req]
distinguished_name = req_distinguished_name
req_extensions = v3_req
prompt = no
[req_distinguished_name]
C = US
ST = California
L = Cupertino
O = Commandment
OU = MDM
CN = ${SSL_HOSTNAME}
[v3_req]
# Extensions to add to a certificate request
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = ${SSL_HOSTNAME}
DNS.2 = localhost
EOF
openssl req -x509 -nodes -days 730 -newkey rsa:2048 -keyout /etc/nginx/ssl.key -out /etc/nginx/ssl.crt -config /tmp/openssl.cnf -extensions 'v3_req'
fi
echo "Starting uWSGI and nginx"
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
================================================
FILE: .docker/nginx.conf
================================================
server {
listen 80;
listen 443 ssl;
ssl_certificate ssl.crt;
ssl_certificate_key ssl.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
root /commandment/commandment/static;
index index.html;
location /api {
include uwsgi_params;
uwsgi_param HTTP_X_CLIENT_CERT $ssl_client_cert;
uwsgi_pass unix:///tmp/uwsgi.sock;
}
location /enroll {
include uwsgi_params;
uwsgi_param HTTP_X_CLIENT_CERT $ssl_client_cert;
uwsgi_pass unix:///tmp/uwsgi.sock;
}
location /checkin {
include uwsgi_params;
uwsgi_param HTTP_X_CLIENT_CERT $ssl_client_cert;
uwsgi_pass unix:///tmp/uwsgi.sock;
}
location /mdm {
include uwsgi_params;
uwsgi_param HTTP_X_CLIENT_CERT $ssl_client_cert;
uwsgi_pass unix:///tmp/uwsgi.sock;
}
location /scep {
include uwsgi_params;
uwsgi_param HTTP_X_CLIENT_CERT $ssl_client_cert;
uwsgi_pass unix:///tmp/uwsgi.sock;
}
location /dep {
include uwsgi_params;
uwsgi_param HTTP_X_CLIENT_CERT $ssl_client_cert;
uwsgi_pass unix:///tmp/uwsgi.sock;
}
location / {
try_files $uri /index.html;
}
location /static {
alias /commandment/commandment/static;
}
}
================================================
FILE: .docker/openssl.cnf
================================================
[req]
distinguished_name = req_distinguished_name
req_extensions = v3_req
[req_distinguished_name]
countryName = Country Name (2 letter code)
countryName_default = AU
stateOrProvinceName = State or Province Name (full name)
stateOrProvinceName_default = New South Wales
localityName = Locality Name (eg, city)
localityName_default = Sydney
organizationalUnitName = Organizational Unit Name (eg, section)
organizationalUnitName_default = Domain Control Validated
commonName = commandment.test
commonName_max = 64
[ v3_req ]
# Extensions to add to a certificate request
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = localhost
DNS.2 = mac.local
================================================
FILE: .docker/settings.cfg.docker
================================================
from os import path
dirname = path.dirname(__file__)
# The public facing hostname of the MDM
# This will also be used as the self signed certificate dnsname
PUBLIC_HOSTNAME = 'commandment.dev'
# Development mode listen port
PORT = 5443
# Configure your Database URI.
# All SQLAlchemy options are available here:
# http://flask-sqlalchemy.pocoo.org/2.1/config/
SQLALCHEMY_DATABASE_URI = 'sqlite:////commandment/commandment.db'
# SQLALCHEMY_DATABASE_ECHO = True
# SQLALCHEMY_TRACK_MODIFICATIONS = False
# ---------------
# Certificates
# ---------------
# [APNS]
# You may supply the certificate as a pair of PEM encoded files, or as a .p12 container.
# If you supply .p12 it will be encoded as a PEM keypair
# -----
# If commandment is running in development mode, specify the path to the certificate and private key.
# These can also be generated at start up.
# Normally SSL should be handled by Apache/Nginx/etc.
# [SSL]
# Specify the Enterprise CA here if Apple Devices won't natively trust your CA eg. If you are using a
# self-signed CA or Enterprise CA Certificate.
# -----
CA_CERTIFICATE = '/etc/nginx/ssl/ca.crt'
# Specify the development web server SSL certificate.
# This only applies if you are running via the CLI or flask run
# -----
SSL_CERTIFICATE = '/etc/nginx/ssl/ssl.crt'
SSL_RSA_KEY = '/etc/nginx/ssl/ssl.key'
# If not using external storage, the path to the root directory for upload storage.
# This should not be used in production.
# -----
STORAGE_ROOT = path.join(dirname, 'storage')
# -------------------------
# SCEP via SCEPy (optional)
# -------------------------
# Directory where certs, revocation lists, serials etc will be kept
# -----
SCEPY_CA_ROOT = "/path/to/ca"
# X.509 Name Attributes used to generate the CA Certificate.
# -----
SCEPY_CA_X509_CN = 'SCEPY-CA'
SCEPY_CA_X509_O = 'SCEPy'
SCEPY_CA_X509_C = 'AU'
# SubjectAltName extension is always on and will use this DNSName
SAN_DNSNAME = 'scepy.dev'
# (Optional) SCEP static challenge. This will have to be part of your SCEP profile
# -----
SCEPY_CHALLENGE = 'sekret'
# Raw data will be dumped to this directory for inspection with tools such as OpenSSL (openssl asn1parse)
# -----
SCEPY_DUMP_DIR = '/tmp/scepy_dump'
# If the GetCACert would return a single cert, force it to use a CMS degenerate case?
# -----
SCEPY_FORCE_DEGENERATE_FOR_SINGLE_CERT = False
================================================
FILE: .docker/supervisord.conf
================================================
[supervisord]
nodaemon=true
[program:uwsgi]
command=/usr/local/bin/uwsgi --ini /etc/uwsgi/uwsgi.ini --ini /etc/uwsgi/uwsgi-commandment.ini --die-on-term --need-app
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:nginx]
command=/usr/sbin/nginx
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
# Graceful stop, see http://nginx.org/en/docs/control.html
stopsignal=QUIT
================================================
FILE: .docker/uwsgi-commandment.ini
================================================
[uwsgi]
base = /commandment
pythonpath = %(base)
module = commandment:create_app()
plugins = python3
env = COMMANDMENT_SETTINGS=/settings.cfg
master = true
processes = 4
enable-threads = true
die-on-term = true
================================================
FILE: .docker/uwsgi.ini
================================================
[uwsgi]
socket = /tmp/uwsgi.sock
chown-socket = nginx:nginx
chmod-socket = 664
# Graceful shutdown on SIGTERM, see https://github.com/unbit/uwsgi/issues/849#issuecomment-118869386
hook-master-start = unix_signal:15 gracefully_kill_them_all
================================================
FILE: .dockerignore
================================================
# Created by .ignore support plugin (hsz.mobi)
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# dotenv
.env
# virtualenv
.venv
venv/
ENV/
# Spyder project settings
.spyderproject
# Rope project settings
.ropeproject
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
# Gradle:
.idea/**/gradle.xml
.idea/**/libraries
# Mongo Explorer plugin:
.idea/**/mongoSettings.xml
## File-based project format:
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Typescript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# Not relevant to running environment
assets
doc
tests
testdata
# ui output should already be in commandment/static
ui
# dont use dev local settings
settings.cfg
# dont copy dev db into context
*.db
# no certificate(s)
*.cer
*.crt
*.p12
*.key
*.pem
ssl
# no simulator(s)
simulators
.git
================================================
FILE: .gitignore
================================================
# Created by .ignore support plugin (hsz.mobi)
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
doc/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# dotenv
.env
# virtualenv
.venv
venv/
ENV/
# Spyder project settings
.spyderproject
# Rope project settings
.ropeproject
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
# Gradle:
.idea/**/gradle.xml
.idea/**/libraries
# Mongo Explorer plugin:
.idea/**/mongoSettings.xml
## File-based project format:
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# IDEA
*.iml
.idea
# SQLite3
*.db
*.db-journal
# Flask settings.cfg
settings.cfg
# dont ever commit certs
*.pem
*.p12
*.cer
*.crt
*.key
*.csr
*.p7m
# dont ever commit vpp tokens if they are downloaded into the root
*.vpptoken
deptoken.json
# mypy
.mypy_cache
# npm lock
package-lock.json
================================================
FILE: .gitlab-ci.yml
================================================
image: python:3.6.5-stretch
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache"
#cache:
# key: ${CI_COMMIT_REF_SLUG}
# paths:
# - node_modules/
#
build_python:
stage: build
# tags:
# - python
before_script:
- python -V
# - pip install virtualenv
# - virtualenv venv
# - source venv/bin/activate
script:
# - apt-get update -qy
# - apt-get install -y python-dev python-pip
- pip install pipenv
- pipenv install --system --dev
cache:
key: backend
paths:
- .cache/
- venv/
- /root/.local/share/virtualenvs/
build_js:
stage: build
# tags:
# - js
script:
- apt-get update -qy
- apt-get install -y apt-transport-https
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
- curl -sL https://deb.nodesource.com/setup_8.x | bash -
- apt-get update -qy
- apt-get install -y yarn
- cd ui && yarn install
- NODE_ENV=production ./node_modules/.bin/webpack
artifacts:
paths:
- commandment/static/
cache:
key: frontend
paths:
- node_modules/
test_python:
stage: test
# tags:
# - python
before_script:
- pip install pipenv
- pipenv install --system --dev
script:
- pytest -v -m "not depsim and not dep and not vppsim and not vpp" tests
cache:
key: backend
paths:
- .cache/
- venv/
- /root/.local/share/virtualenvs/
================================================
FILE: LICENSE.txt
================================================
Copyright (c) 2015 Jesse Peterson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: Pipfile
================================================
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[requires]
python_version = "3.6"
[packages]
acme = "*"
aiohttp = "*"
alembic = "*"
"aniso8601" = "*"
apns = "*"
"apns2-client" = "*"
babel = "*"
biplist = "*"
bixar = {git = "https://github.com/cmdmnt/bixar.git",editable = true}
blinker = "*"
decorator = "*"
docutils = "*"
flask = "*"
flask-alembic = "*"
flask-cors = "*"
flask-jwt = "*"
flask-marshmallow = "*"
flask-rest-jsonapi = "*"
flask-restful = "*"
flask-sqlalchemy = "*"
future = "*"
imagesize = "*"
marshmallow-enum = "*"
marshmallow-sqlalchemy = "*"
"oauth2" = "*"
"oauth2client" = "*"
oscrypto = "*"
passlib = "*"
paste = "*"
py = "*"
"pyasn1" = "*"
"pyasn1-modules" = "*"
pycparser = "*"
pycryptodomex = "*"
pygments = "*"
pyparsing = "*"
"repoze.who" = "*"
requests = "*"
rsa = "*"
SCEPy = {git = "https://github.com/cmdmnt/SCEPy.git",editable = true}
semver = "*"
signxml = "*"
ukpostcodeparser = "*"
sqlalchemy = "*"
cryptography = "*"
python-dateutil = "*"
requests-oauthlib = "*"
authlib = "*"
commandment = {editable = true,path = "."}
[dev-packages]
alembic-viz = "*"
factory-boy = "*"
mock = "*"
mypy = "*"
pytest = "*"
pytest-runner = "*"
sadisplay = "*"
sphinx = "*"
sphinxcontrib-httpdomain = "*"
sphinxcontrib-napoleon = "*"
sphinxcontrib-plantuml = "*"
sphinxcontrib-websupport = "*"
guzzle-sphinx-theme = "*"
typing = "*"
sphinx-rtd-theme = "*"
================================================
FILE: README.rst
================================================
===========================
Commandment Open Source MDM
===========================
.. image:: https://travis-ci.org/cmdmnt/commandment.svg?branch=master
:target: https://travis-ci.org/cmdmnt/commandment
Commandment is an Open Source Apple MDM with support for managing iOS and macOS devices.
The source code is available under an `MIT license <LICENSE.txt>`_.
------------
Requirements
------------
* Apple MDM Push Certificate and private key (in PEM format)
* Obtain a free Push Certificate from `mdmcert.download <https://mdmcert.download>`_.
* Alternatively requires an Apple Enterprise Developer account (US$300/year) with the MDM vendor option enabled.
* A trusted TLS certificate for the MDM.
* `Python 3.6+ <https://www.python.org/>`_
-------------
Documentation
-------------
The user, developer and API documentation is available at:
http://cmdmnt.github.io/commandment/
------------------
Bugs, issues, etc.
------------------
Please report any issues, bugs, suggestions, feedback, etc.
to the `issue tracker <https://github.com/cmdmnt/commandment/issues>`_ of this project.
Also for discussion, and support, join us in the #commandment channel in the `MacAdmins Slack <http://macadmins.herokuapp.com/>`_ !
================================================
FILE: alembic.ini
================================================
[alembic]
# path to migration scripts
script_location = %(here)s/commandment/alembic
sqlalchemy.url = sqlite:///commandment.db
# Logging configuration
[loggers]
keys = root,sqlalchemy,alembic
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = DEBUG
handlers = console
qualname =
[logger_sqlalchemy]
level = INFO
handlers =
qualname = sqlalchemy.engine
[logger_alembic]
level = DEBUG
handlers =
qualname = alembic
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S
================================================
FILE: commandment/__init__.py
================================================
"""
Copyright (c) 2015 Jesse Peterson, 2017 Mosen
Licensed under the MIT license. See the included LICENSE.txt file for details.
"""
from typing import Union, Optional
from pathlib import PurePath
from flask import Flask, render_template
from commandment.mdm.app import mdm_app
from .ac2.ac2_app import ac2_app
from .api.app_jsonapi import api_app, api
from .api.app_json import flat_api
from .apns.app import api_push_app
from .auth.app import oauth_app
from .auth import oauth2
from .api.configuration import configuration_app
from .enroll.app import enroll_app
from .models import db
from .omdm import omdm_app
from .dep.app import dep_app
from .vpp.app import vpp_app
from .profiles.api import profiles_api_app
from .inventory.api import api_app as inventory_api
from .mdm.api import api_app as mdm_api
from .apps.app_jsonapi import api_app as applications_api
from .threads import startup_thread
from .dep import threads as dep_threads
from .apns import threads as push_threads
def create_app(config_file: Optional[Union[str, PurePath]] = None) -> Flask:
"""Create the Flask Application.
Configuration is looked up the following order:
- default_settings.py in the commandment package.
- config_file parameter passed to this factory method.
- environment variable ``COMMANDMENT_SETTINGS`` pointing to a .cfg file.
Args:
config_file (Union[str, PurePath]): Path to configuration file.
Returns:
Instance of the flask application
"""
app = Flask(__name__)
app.config.from_object('commandment.default_settings')
if config_file is not None:
app.config.from_pyfile(config_file)
else:
app.config.from_envvar('COMMANDMENT_SETTINGS')
db.init_app(app)
oauth2.init_app(app)
api.init_app(app)
api.oauth_manager(oauth2.require_oauth)
app.register_blueprint(oauth_app, url_prefix='/oauth')
app.register_blueprint(enroll_app, url_prefix='/enroll')
app.register_blueprint(mdm_app)
app.register_blueprint(configuration_app, url_prefix='/api/v1/configuration')
app.register_blueprint(api_app, url_prefix='/api')
app.register_blueprint(api_push_app, url_prefix='/api')
app.register_blueprint(flat_api, url_prefix='/api')
app.register_blueprint(profiles_api_app, url_prefix='/api')
app.register_blueprint(applications_api, url_prefix='/api')
app.register_blueprint(omdm_app, url_prefix='/omdm')
app.register_blueprint(ac2_app)
app.register_blueprint(dep_app)
app.register_blueprint(vpp_app)
try:
from scepy.blueprint import scep_app
app.register_blueprint(scep_app, url_prefix='/scep')
app.logger.info('Registered SCEPy service at /scep')
except ImportError:
app.logger.warning("SCEP will not be available, cannot load SCEPy")
# Threads
startup_thread.start(app)
# dep_threads.start(app)
# push_threads.start(app)
# SPA Entry Point (when not behind nginx or apache)
@app.route('/')
def index():
"""Main entry point for the administrator web application."""
return render_template('index.html')
# SPA history fallback handler
@app.errorhandler(404)
def send_index(path: str):
"""Fallback route for HTML5 History."""
return render_template('index.html')
return app
================================================
FILE: commandment/ac2/__init__.py
================================================
================================================
FILE: commandment/ac2/ac2_app.py
================================================
from flask import Blueprint, jsonify, current_app
ac2_app = Blueprint('ac2_app', __name__)
@ac2_app.route('/MDMServiceConfig')
def mdm_service_config():
"""Apple Configurator 2 checks this route to figure out which enrollment profile it should use."""
public_hostname = current_app.config.get('PUBLIC_HOSTNAME', 'localhost')
port = current_app.config.get('PORT', 443)
return jsonify({
'dep_enrollment_url': 'https://{}:{}/dep/profile'.format(public_hostname, port),
'dep_anchor_certs_url': 'https://{}:{}/dep/anchor_certs'.format(public_hostname, port),
'trust_profile_url': 'https://{}:{}/enroll/trust.mobileconfig'.format(public_hostname, port)
})
================================================
FILE: commandment/alembic/__init__.py
================================================
================================================
FILE: commandment/alembic/disabled_versions/072fba4a2256_create_ad_payload_table.py
================================================
"""Create ad_payload table
Revision ID: 072fba4a2256
Revises: 8186b8ecf0fc
Create Date: 2017-05-19 19:50:25.537513
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '072fba4a2256'
down_revision = '8186b8ecf0fc'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('ad_payload',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('host_name', sa.String(), nullable=False),
sa.Column('user_name', sa.String(), nullable=False),
sa.Column('password', sa.String(), nullable=False),
sa.Column('ad_organizational_unit', sa.String(), nullable=False),
sa.Column('ad_mount_style', sa.Enum('AFP', 'SMB', name='admountstyle'), nullable=False),
sa.Column('ad_default_user_shell', sa.String(), nullable=True),
sa.Column('ad_map_uid_attribute', sa.String(), nullable=True),
sa.Column('ad_map_gid_attribute', sa.String(), nullable=True),
sa.Column('ad_map_ggid_attribute', sa.String(), nullable=True),
sa.Column('ad_preferred_dc_server', sa.String(), nullable=True),
sa.Column('ad_domain_admin_group_list', sa.String(), nullable=True),
sa.Column('ad_namespace', sa.Enum('Domain', 'Forest', name='adnamespace'), nullable=True),
sa.Column('ad_packet_sign', sa.Enum('Allow', 'Disable', 'Require', name='adpacketsignpolicy'), nullable=True),
sa.Column('ad_packet_encrypt', sa.Enum('Allow', 'Disable', 'Require', 'SSL', name='adpacketencryptpolicy'), nullable=True),
sa.Column('ad_restrict_ddns', sa.String(), nullable=True),
sa.Column('ad_trust_change_pass_interval', sa.Integer(), nullable=True),
sa.Column('ad_create_mobile_account_at_login', sa.Boolean(), nullable=True),
sa.Column('ad_warn_user_before_creating_ma', sa.Boolean(), nullable=True),
sa.Column('ad_force_home_local', sa.Boolean(), nullable=True),
sa.ForeignKeyConstraint(['id'], ['payloads.id'], ),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('ad_payload')
================================================
FILE: commandment/alembic/disabled_versions/18412434fb57_create_energy_saver_payload_table.py
================================================
"""Create energy_saver_payload table
Revision ID: 18412434fb57
Revises: 323a90039a6a
Create Date: 2017-05-19 19:53:03.142964
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
# revision identifiers, used by Alembic.
revision = '18412434fb57'
down_revision = '323a90039a6a'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('energy_saver_payload',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('destroy_fv_key_on_standby', sa.Boolean(), nullable=True),
sa.Column('sleep_disabled', sa.Boolean(), nullable=True),
sa.Column('desktop_acpower_profilenumber', sa.Integer(), nullable=True),
sa.Column('portable_acpower_profilenumber', sa.Integer(), nullable=True),
sa.Column('portable_battery_profilenumber', sa.Integer(), nullable=True),
sa.Column('desktop_acpower', commandment.dbtypes.JSONEncodedDict(), nullable=True),
sa.Column('portable_acpower', commandment.dbtypes.JSONEncodedDict(), nullable=True),
sa.Column('portable_battery', commandment.dbtypes.JSONEncodedDict(), nullable=True),
sa.Column('desktop_schedule', commandment.dbtypes.JSONEncodedDict(), nullable=True),
sa.ForeignKeyConstraint(['id'], ['payloads.id'], ),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('energy_saver_payload')
================================================
FILE: commandment/alembic/disabled_versions/323a90039a6a_create_email_payload_table.py
================================================
"""Create email_payload table
Revision ID: 323a90039a6a
Revises: e47e29a9537c
Create Date: 2017-05-19 19:52:05.726744
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '323a90039a6a'
down_revision = 'e47e29a9537c'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('email_payload',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('email_account_description', sa.String(), nullable=True),
sa.Column('email_account_name', sa.String(), nullable=True),
sa.Column('email_account_type', sa.Enum('POP', 'IMAP', name='emailaccounttype'), nullable=False),
sa.Column('email_address', sa.String(), nullable=True),
sa.Column('incoming_auth', sa.Enum('Password', 'CRAM_MD5', 'NTLM', 'HTTP_MD5', 'ENone', name='emailauthenticationtype'), nullable=False),
sa.Column('incoming_host', sa.String(), nullable=False),
sa.Column('incoming_port', sa.Integer(), nullable=True),
sa.Column('incoming_use_ssl', sa.Boolean(), nullable=True),
sa.Column('incoming_username', sa.String(), nullable=False),
sa.Column('incoming_password', sa.String(), nullable=True),
sa.Column('outgoing_password', sa.String(), nullable=True),
sa.Column('outgoing_incoming_same', sa.Boolean(), nullable=True),
sa.Column('outgoing_auth', sa.Enum('Password', 'CRAM_MD5', 'NTLM', 'HTTP_MD5', 'ENone', name='emailauthenticationtype'), nullable=False),
sa.ForeignKeyConstraint(['id'], ['payloads.id'], ),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('email_payload')
================================================
FILE: commandment/alembic/disabled_versions/4eddbcb30464_create_mdm_payload_table.py
================================================
"""Create mdm_payload table
Revision ID: 4eddbcb30464
Revises: 18412434fb57
Create Date: 2017-05-19 19:54:24.264198
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
# revision identifiers, used by Alembic.
revision = '4eddbcb30464'
down_revision = '18412434fb57'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('mdm_payload',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('identity_certificate_uuid', commandment.dbtypes.GUID(), nullable=False),
sa.Column('topic', sa.String(), nullable=False),
sa.Column('server_url', sa.String(), nullable=False),
sa.Column('server_capabilities', sa.String(), nullable=True),
sa.Column('sign_message', sa.Boolean(), nullable=True),
sa.Column('check_in_url', sa.String(), nullable=True),
sa.Column('check_out_when_removed', sa.Boolean(), nullable=True),
sa.Column('access_rights', sa.Integer(), nullable=True),
sa.Column('use_development_apns', sa.Boolean(), nullable=True),
sa.ForeignKeyConstraint(['id'], ['payloads.id'], ),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('mdm_payload')
================================================
FILE: commandment/alembic/disabled_versions/8186b8ecf0fc_create_ad_cert_payload_table.py
================================================
"""Create ad_cert_payload table
Revision ID: 8186b8ecf0fc
Revises: 13358fb3846b
Create Date: 2017-05-19 19:49:07.136996
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '8186b8ecf0fc'
down_revision = '13358fb3846b'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('ad_cert_payload',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('certificate_description', sa.String(), nullable=True),
sa.Column('allow_all_apps_access', sa.Boolean(), nullable=True),
sa.Column('cert_server', sa.String(), nullable=False),
sa.Column('cert_template', sa.String(), nullable=False),
sa.Column('acquisition_mechanism', sa.Enum('RPC', 'HTTP', name='adcertificateacquisitionmechanism'), nullable=True),
sa.Column('certificate_authority', sa.String(), nullable=False),
sa.Column('renewal_time_interval', sa.Integer(), nullable=True),
sa.Column('identity_description', sa.String(), nullable=True),
sa.Column('key_is_extractable', sa.Boolean(), nullable=True),
sa.Column('prompt_for_credentials', sa.Boolean(), nullable=True),
sa.Column('keysize', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['id'], ['payloads.id'], ),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('ad_cert_payload')
================================================
FILE: commandment/alembic/disabled_versions/9dd4e48235e3_create_vpn_payload_table.py
================================================
"""Create vpn_payload table
Revision ID: 9dd4e48235e3
Revises: e5840df9a88a
Create Date: 2017-05-19 19:59:55.582629
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '9dd4e48235e3'
down_revision = 'e5840df9a88a'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('vpn_payload',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('user_defined_name', sa.String(), nullable=True),
sa.Column('override_primary', sa.Boolean(), nullable=True),
sa.Column('vpn_type', sa.Enum('L2TP', 'PPTP', 'IPSec', 'IKEv2', 'AlwaysOn', 'VPN', name='vpntype'), nullable=False),
sa.Column('vpn_sub_type', sa.String(), nullable=True),
sa.Column('provider_bundle_identifier', sa.String(), nullable=True),
sa.Column('on_demand_enabled', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['id'], ['payloads.id'], ),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('vpn_payload')
================================================
FILE: commandment/alembic/disabled_versions/d65049bf4b91_create_wifi_payload_table.py
================================================
"""Create wifi_payload table
Revision ID: d65049bf4b91
Revises: 9dd4e48235e3
Create Date: 2017-05-19 20:00:36.548840
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
# revision identifiers, used by Alembic.
revision = 'd65049bf4b91'
down_revision = '9dd4e48235e3'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('wifi_payload',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('ssid_str', sa.String(), nullable=False),
sa.Column('hidden_network', sa.Boolean(), nullable=True),
sa.Column('auto_join', sa.Boolean(), nullable=True),
sa.Column('encryption_type', sa.Enum('ENone', 'Any', 'WPA2', 'WPA', 'WEP', name='wifiencryptiontype'), nullable=True),
sa.Column('is_hotspot', sa.Boolean(), nullable=True),
sa.Column('domain_name', sa.String(), nullable=True),
sa.Column('service_provider_roaming_enabled', sa.Boolean(), nullable=True),
sa.Column('roaming_consortium_ois', sa.String(), nullable=True),
sa.Column('nai_realm_names', sa.String(), nullable=True),
sa.Column('mccs_and_mncs', sa.String(), nullable=True),
sa.Column('displayed_operator_name', sa.String(), nullable=True),
sa.Column('captive_bypass', sa.Boolean(), nullable=True),
sa.Column('password', sa.String(), nullable=True),
sa.Column('tls_certificate_required', sa.Boolean(), nullable=True),
sa.Column('payload_certificate_uuid', commandment.dbtypes.GUID(), nullable=True),
sa.Column('proxy_type', sa.String(), nullable=True),
sa.Column('proxy_server', sa.String(), nullable=True),
sa.Column('proxy_server_port', sa.Integer(), nullable=True),
sa.Column('proxy_username', sa.String(), nullable=True),
sa.Column('proxy_password', sa.String(), nullable=True),
sa.Column('proxy_pac_url', sa.String(), nullable=True),
sa.Column('proxy_pac_fallback_allowed', sa.Boolean(), nullable=True),
sa.ForeignKeyConstraint(['id'], ['payloads.id'], ),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('wifi_payload')
================================================
FILE: commandment/alembic/disabled_versions/da52b64b865f_create_apps_table.py
================================================
"""Create apps table
Revision ID: da52b64b865f
Revises:
Create Date: 2017-05-18 22:27:44.830159
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'da52b64b865f'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
op.create_table('apps',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('filename', sa.String(), nullable=False),
sa.Column('filesize', sa.Integer(), nullable=False),
sa.Column('md5_hash', sa.String(length=32), nullable=False),
sa.Column('md5_chunk_size', sa.Integer(), nullable=False),
sa.Column('md5_chunk_hashes', sa.Text(), nullable=True),
sa.Column('bundle_ids_json', sa.Text(), nullable=True),
sa.Column('pkg_ids_json', sa.Text(), nullable=True),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('filename')
)
def downgrade():
op.drop_table('app')
================================================
FILE: commandment/alembic/disabled_versions/e47e29a9537c_create_certificate_payload_table.py
================================================
"""Create certificate_payload table
Revision ID: e47e29a9537c
Revises: 072fba4a2256
Create Date: 2017-05-19 19:51:20.672688
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'e47e29a9537c'
down_revision = '072fba4a2256'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('certificate_payload',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('certificate_file_name', sa.String(), nullable=True),
sa.Column('payload_content', sa.LargeBinary(), nullable=True),
sa.Column('password', sa.String(), nullable=True),
sa.ForeignKeyConstraint(['id'], ['payloads.id'], ),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('certificate_payload')
================================================
FILE: commandment/alembic/disabled_versions/fc0c134cbb2e_create_password_policy_payload_table.py
================================================
"""Create password_policy_payload table
Revision ID: fc0c134cbb2e
Revises: 4eddbcb30464
Create Date: 2017-05-19 19:56:45.009648
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'fc0c134cbb2e'
down_revision = '4eddbcb30464'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('password_policy_payload',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('allow_simple', sa.Boolean(), nullable=True),
sa.Column('force_pin', sa.Boolean(), nullable=True),
sa.Column('max_failed_attempts', sa.Integer(), nullable=True),
sa.Column('max_inactivity', sa.Integer(), nullable=True),
sa.Column('max_pin_age_in_days', sa.Integer(), nullable=True),
sa.Column('min_complex_chars', sa.Integer(), nullable=True),
sa.Column('min_length', sa.Integer(), nullable=True),
sa.Column('require_alphanumeric', sa.Boolean(), nullable=True),
sa.Column('pin_history', sa.Integer(), nullable=True),
sa.Column('max_grace_period', sa.Integer(), nullable=True),
sa.Column('allow_fingerprint_modification', sa.Boolean(), nullable=True),
sa.ForeignKeyConstraint(['id'], ['payloads.id'], ),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('password_policy_payload')
================================================
FILE: commandment/alembic/env.py
================================================
from __future__ import with_statement
from alembic import context
from sqlalchemy import engine_from_config, pool
from logging.config import fileConfig
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
# Interpret the config file for Python logging.
# This line sets up loggers basically.
fileConfig(config.config_file_name)
# add your model's MetaData object here
# for 'autogenerate' support
from commandment.models import db
# import commandment.vpp.models
#import commandment.dep.models
#import commandment.apps.models
#import commandment.pki.models
import commandment.auth.models
target_metadata = db.metadata
# other values from the config, defined by the needs of env.py,
# can be acquired:
# my_important_option = config.get_main_option("my_important_option")
# ... etc.
def run_migrations_offline():
"""Run migrations in 'offline' mode.
This configures the context with just a URL
and not an Engine, though an Engine is acceptable
here as well. By skipping the Engine creation
we don't even need a DBAPI to be available.
Calls to context.execute() here emit the given string to the
script output.
"""
url = config.get_main_option("sqlalchemy.url")
context.configure(
url=url, target_metadata=target_metadata, literal_binds=True)
with context.begin_transaction():
context.run_migrations()
def run_migrations_online():
"""Run migrations in 'online' mode.
In this scenario we need to create an Engine
and associate a connection with the context.
"""
connectable = config.attributes.get('connection', None)
if connectable is None:
# only create Engine if we don't have a Connection
# from the outside
connectable = engine_from_config(
config.get_section(config.config_ini_section),
prefix='sqlalchemy.',
poolclass=pool.NullPool)
# when connectable is already a Connection object, calling
# connect() gives us a *branched connection*.
with connectable.connect() as connection:
context.configure(
connection=connection,
target_metadata=target_metadata,
render_as_batch=True,
)
with context.begin_transaction():
context.run_migrations()
if context.is_offline_mode():
run_migrations_offline()
else:
run_migrations_online()
================================================
FILE: commandment/alembic/script.py.mako
================================================
"""${message}
Revision ID: ${up_revision}
Revises: ${down_revision | comma,n}
Create Date: ${create_date}
"""
# From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
${imports if imports else ""}
from alembic import context
# revision identifiers, used by Alembic.
revision = ${repr(up_revision)}
down_revision = ${repr(down_revision)}
branch_labels = ${repr(branch_labels)}
depends_on = ${repr(depends_on)}
def upgrade():
schema_upgrades()
if context.get_x_argument(as_dictionary=True).get('data', None):
data_upgrades()
def downgrade():
if context.get_x_argument(as_dictionary=True).get('data', None):
data_downgrades()
schema_downgrades()
def schema_upgrades():
"""schema upgrade migrations go here."""
${upgrades if upgrades else "pass"}
def schema_downgrades():
"""schema downgrade migrations go here."""
${downgrades if downgrades else "pass"}
def data_upgrades():
"""Add any optional data upgrade migrations here!"""
pass
def data_downgrades():
"""Add any optional data downgrade migrations here!"""
pass
================================================
FILE: commandment/alembic/versions/0201b96ab856_add_ios_available_os_updates_fields.py
================================================
"""add ios available os updates fields
Revision ID: 0201b96ab856
Revises: e947cdf82307
Create Date: 2018-07-01 21:37:27.355712
"""
# From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = '0201b96ab856'
down_revision = 'e947cdf82307'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
op.add_column('available_os_updates', sa.Column('build', sa.String(), nullable=True))
op.add_column('available_os_updates', sa.Column('download_size', sa.BigInteger(), nullable=True))
op.add_column('available_os_updates', sa.Column('install_size', sa.BigInteger(), nullable=True))
op.add_column('available_os_updates', sa.Column('product_name', sa.String(), nullable=True))
def schema_downgrades():
op.drop_column('available_os_updates', 'product_name')
op.drop_column('available_os_updates', 'install_size')
op.drop_column('available_os_updates', 'download_size')
op.drop_column('available_os_updates', 'build')
# def data_upgrades():
# """Add any optional data upgrade migrations here!"""
# pass
#
#
# def data_downgrades():
# """Add any optional data downgrade migrations here!"""
# pass
================================================
FILE: commandment/alembic/versions/0ab46b2f6d8c_create_users_table.py
================================================
"""Create users table
Revision ID: 0ab46b2f6d8c
Revises: f5237c7e2374
Create Date: 2017-05-19 19:35:12.126022
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '0ab46b2f6d8c'
down_revision = 'f5237c7e2374'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('users',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(), nullable=True),
sa.Column('fullname', sa.String(), nullable=True),
sa.Column('password', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('users')
================================================
FILE: commandment/alembic/versions/0c4c448f4daf_create_device_users_table.py
================================================
"""Create device_users table
Revision ID: 0c4c448f4daf
Revises: 7d578eb75092
Create Date: 2017-05-18 22:32:52.087025
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
# revision identifiers, used by Alembic.
revision = '0c4c448f4daf'
down_revision = '7d578eb75092'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('device_users',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('udid', commandment.dbtypes.GUID(), nullable=False),
sa.Column('user_id', commandment.dbtypes.GUID(), nullable=False),
sa.Column('long_name', sa.String(), nullable=True),
sa.Column('short_name', sa.String(), nullable=True),
sa.Column('need_sync_response', sa.Boolean(), nullable=True),
sa.Column('user_configuration', sa.Boolean(), nullable=True),
sa.Column('digest_challenge', sa.String(), nullable=True),
sa.Column('auth_token', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('device_users')
================================================
FILE: commandment/alembic/versions/0e5babc5b9ee_create_vpp_licenses.py
================================================
"""Create vpp_licenses table
Revision ID: 0e5babc5b9ee
Revises: 875dcce0bf8b
Create Date: 2017-07-19 12:56:55.273155
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = '0e5babc5b9ee'
down_revision = '875dcce0bf8b'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
"""schema upgrade migrations go here."""
op.create_table('vpp_licenses',
sa.Column('license_id', sa.Integer(), nullable=False),
sa.Column('adam_id', sa.String(), nullable=True),
sa.Column('product_type', sa.Enum('Software', 'Application', 'Publication', name='vppproducttype'), nullable=True),
sa.Column('product_type_name', sa.String(), nullable=True),
sa.Column('pricing_param', sa.Enum('StandardQuality', 'HighQuality', name='vpppricingparam'), nullable=True),
sa.Column('is_irrevocable', sa.Boolean(), nullable=True),
sa.Column('user_id', sa.Integer(), nullable=True),
sa.Column('client_user_id', commandment.dbtypes.GUID(), nullable=True),
sa.Column('its_id_hash', sa.String(), nullable=True),
sa.ForeignKeyConstraint(['client_user_id'], ['vpp_users.client_user_id'], ),
sa.ForeignKeyConstraint(['user_id'], ['vpp_users.user_id'], ),
sa.PrimaryKeyConstraint('license_id')
)
def schema_downgrades():
"""schema downgrade migrations go here."""
op.drop_table('vpp_licenses')
def data_upgrades():
"""Add any optional data upgrade migrations here!"""
pass
def data_downgrades():
"""Add any optional data downgrade migrations here!"""
pass
================================================
FILE: commandment/alembic/versions/1005dc7dea01_os_update_settings.py
================================================
"""os_update_settings
Revision ID: 1005dc7dea01
Revises: b74ca08cfd9a
Create Date: 2018-02-02 15:49:22.170956
"""
# From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = '1005dc7dea01'
down_revision = 'b74ca08cfd9a'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
"""schema upgrade migrations go here."""
op.add_column('devices', sa.Column('osu_automatic_app_installation_enabled', sa.Boolean(), nullable=True))
op.add_column('devices', sa.Column('osu_automatic_check_enabled', sa.Boolean(), nullable=True))
op.add_column('devices', sa.Column('osu_automatic_os_installation_enabled', sa.Boolean(), nullable=True))
op.add_column('devices', sa.Column('osu_automatic_security_updates_enabled', sa.Boolean(), nullable=True))
op.add_column('devices', sa.Column('osu_background_download_enabled', sa.Boolean(), nullable=True))
op.add_column('devices', sa.Column('osu_catalog_url', sa.String(), nullable=True))
op.add_column('devices', sa.Column('osu_is_default_catalog', sa.Boolean(), nullable=True))
op.add_column('devices', sa.Column('osu_perform_periodic_check', sa.Boolean(), nullable=True))
op.add_column('devices', sa.Column('osu_previous_scan_date', sa.DateTime(), nullable=True))
op.add_column('devices', sa.Column('osu_previous_scan_result', sa.String(), nullable=True))
def schema_downgrades():
"""schema downgrade migrations go here."""
op.drop_column('devices', 'osu_previous_scan_result')
op.drop_column('devices', 'osu_previous_scan_date')
op.drop_column('devices', 'osu_perform_periodic_check')
op.drop_column('devices', 'osu_is_default_catalog')
op.drop_column('devices', 'osu_catalog_url')
op.drop_column('devices', 'osu_background_download_enabled')
op.drop_column('devices', 'osu_automatic_security_updates_enabled')
op.drop_column('devices', 'osu_automatic_os_installation_enabled')
op.drop_column('devices', 'osu_automatic_check_enabled')
op.drop_column('devices', 'osu_automatic_app_installation_enabled')
def data_upgrades():
"""Add any optional data upgrade migrations here!"""
pass
def data_downgrades():
"""Add any optional data downgrade migrations here!"""
pass
================================================
FILE: commandment/alembic/versions/13358fb3846b_create_subject_alternative_names_table.py
================================================
"""Create subject_alternative_names table
Revision ID: 13358fb3846b
Revises: ea34ae3f1e7e
Create Date: 2017-05-19 19:48:09.977131
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '13358fb3846b'
down_revision = 'ea34ae3f1e7e'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('subject_alternative_names',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('discriminator', sa.Enum('RFC822Name', 'DNSName', 'UniformResourceIdentifier', 'DirectoryName', 'RegisteredID', 'IPAddress', 'OtherName', name='subjectalternativenametype'), nullable=False),
sa.Column('str_value', sa.String(), nullable=True),
sa.Column('octet_value', sa.LargeBinary(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('subject_alternative_names')
================================================
FILE: commandment/alembic/versions/1532dff16984_drop_device_groups.py
================================================
"""drop device groups
Revision ID: 1532dff16984
Revises: f8eb70b3aa2b
Create Date: 2018-03-13 21:26:13.058020
"""
# From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = '1532dff16984'
down_revision = 'f8eb70b3aa2b'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
"""schema upgrade migrations go here."""
op.drop_table('device_groups')
op.drop_table('device_group_devices')
def schema_downgrades():
"""schema downgrade migrations go here."""
op.create_table('device_group_devices',
sa.Column('device_group_id', sa.INTEGER(), nullable=False),
sa.Column('device_id', sa.INTEGER(), nullable=False),
sa.ForeignKeyConstraint(['device_group_id'], ['device_groups.id'], ),
sa.ForeignKeyConstraint(['device_id'], ['devices.id'], ),
sa.PrimaryKeyConstraint('device_group_id', 'device_id')
)
op.create_table('device_groups',
sa.Column('id', sa.INTEGER(), nullable=False),
sa.Column('name', sa.VARCHAR(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
def data_upgrades():
"""Add any optional data upgrade migrations here!"""
pass
def data_downgrades():
"""Add any optional data downgrade migrations here!"""
pass
================================================
FILE: commandment/alembic/versions/2808deb9fc62_create_dep_configurations.py
================================================
"""Create DEP configurations
Revision ID: 2808deb9fc62
Revises: 0201b96ab856
Create Date: 2018-07-04 16:57:16.899029
"""
# From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = '2808deb9fc62'
down_revision = '0201b96ab856'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
op.create_table('dep_accounts',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('certificate_id', sa.Integer(), nullable=True),
sa.Column('consumer_key', sa.String(), nullable=True),
sa.Column('consumer_secret', sa.String(), nullable=True),
sa.Column('access_token', sa.String(), nullable=True),
sa.Column('access_secret', sa.String(), nullable=True),
sa.Column('access_token_expiry', sa.DateTime(), nullable=True),
sa.Column('token_updated_at', sa.DateTime(), nullable=True),
sa.Column('auth_session_token', sa.String(), nullable=True),
sa.Column('server_name', sa.String(), nullable=True),
sa.Column('server_uuid', commandment.dbtypes.GUID(), nullable=True),
sa.Column('admin_id', sa.String(), nullable=True),
sa.Column('facilitator_id', sa.String(), nullable=True),
sa.Column('org_name', sa.String(), nullable=True),
sa.Column('org_email', sa.String(), nullable=True),
sa.Column('org_phone', sa.String(), nullable=True),
sa.Column('org_address', sa.String(), nullable=True),
sa.Column('org_type', sa.Enum('Education', 'Organization', name='deporgtype'), nullable=True),
sa.Column('org_version', sa.Enum('v1', 'v2', name='deporgversion'), nullable=True),
sa.Column('org_id', sa.String(), nullable=True),
sa.Column('org_id_hash', sa.String(), nullable=True),
sa.Column('url', sa.String(), nullable=True),
sa.Column('cursor', sa.String(), nullable=True),
sa.Column('more_to_follow', sa.Boolean(), nullable=True),
sa.Column('fetched_until', sa.DateTime(), nullable=True),
sa.ForeignKeyConstraint(['certificate_id'], ['certificates.id'], ),
sa.PrimaryKeyConstraint('id')
)
def schema_downgrades():
op.drop_table('dep_accounts')
# def data_upgrades():
# """Add any optional data upgrade migrations here!"""
# pass
#
#
# def data_downgrades():
# """Add any optional data downgrade migrations here!"""
# pass
================================================
FILE: commandment/alembic/versions/2f1507bf6dc1_create_application_manifests_table.py
================================================
"""create application_manifests table
Revision ID: 2f1507bf6dc1
Revises: 7ab500f58a76
Create Date: 2017-10-15 17:37:04.645717
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = '2f1507bf6dc1'
down_revision = '7ab500f58a76'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
op.create_table(
'application_manifests',
sa.Column('id', sa.Integer(), primary_key=True),
sa.Column('bundle_id', sa.String(), nullable=False),
sa.Column('bundle_version', sa.String()),
sa.Column('kind', sa.String()),
sa.Column('size_in_bytes', sa.BigInteger()),
sa.Column('subtitle', sa.String()),
sa.Column('title', sa.String()),
sa.Column('display_image_url', sa.String()),
sa.Column('display_image_needs_shine', sa.Boolean()),
sa.Column('full_size_image_url', sa.String()),
sa.Column('full_size_image_needs_shine', sa.Boolean()),
#op.add_column('application_manifests', sa.Column('full_size_image_needs_shine', sa.Boolean(), nullable=True))
#op.add_column('application_manifests', sa.Column('full_size_image_url', sa.String(), nullable=True))
# sa.UniqueConstraint('bundle_id', 'bundle_version', name='uq_application_bundle_version')
)
op.create_table(
'application_manifest_checksums',
sa.Column('id', sa.Integer(), primary_key=True),
sa.Column('application_manifest_id', sa.Integer(), nullable=True),
sa.Column('checksum_index', sa.Integer(), nullable=False),
sa.Column('checksum_value', sa.String(), nullable=False),
sa.ForeignKeyConstraint(['application_manifest_id'], ['application_manifests.id']),
# sa.ForeignKeyConstraint(['application_manifest_id'], ['application_manifests.id'], ondelete="CASCADE"),
# sa.UniqueConstraint('application_manifest_id', 'checksum_index', name='uq_application_checksum_index')
)
# Commented items from an earlier migration:
# op.create_table('applications_manifests',
# sa.Column('id', sa.Integer(), nullable=False),
# sa.Column('bundle_id', sa.String(), nullable=False),
# sa.Column('bundle_version', sa.String(), nullable=True),
# sa.Column('kind', sa.String(), nullable=True),
# sa.Column('size_in_bytes', sa.BigInteger(), nullable=True),
# sa.Column('subtitle', sa.String(), nullable=True),
# sa.Column('title', sa.String(), nullable=True),
# sa.PrimaryKeyConstraint('id')
# )
# op.create_index(op.f('ix_applications_manifests_bundle_id'), 'applications_manifests', ['bundle_id'], unique=False)
# op.create_index(op.f('ix_applications_manifests_bundle_version'), 'applications_manifests', ['bundle_version'],
# unique=False)
# op.create_table('application_manifest_checksums',
# sa.Column('id', sa.Integer(), nullable=False),
# sa.Column('application_manifest_id', sa.Integer(), nullable=True),
# sa.Column('checksum_index', sa.Integer(), nullable=False),
# sa.Column('checksum_value', sa.String(), nullable=False),
# sa.ForeignKeyConstraint(['application_manifest_id'], ['applications_manifests.id'], ),
# sa.PrimaryKeyConstraint('id')
# )
# op.create_unique_constraint(
# op.f('uq_application_manifest_checksum_manifest_index'),
# 'application_manifest_checksums', ['application_manifest_id', 'checksum_index'])
def schema_downgrades():
"""schema downgrade migrations go here."""
# Commented items from an earlier migration:
# op.drop_constraint(op.f('uq_application_manifest_checksum_manifest_index'),
# table_name='application_manifest_checksums')
# op.drop_table('application_manifest_checksums')
# op.drop_index(op.f('ix_applications_manifests_bundle_version'), table_name='applications_manifests')
# op.drop_index(op.f('ix_applications_manifests_bundle_id'), table_name='applications_manifests')
# op.drop_table('applications_manifests')
op.drop_table('application_manifest_checksums')
op.drop_table('application_manifests')
def data_upgrades():
"""Add any optional data upgrade migrations here!"""
pass
def data_downgrades():
"""Add any optional data downgrade migrations here!"""
pass
================================================
FILE: commandment/alembic/versions/3061e56045eb_create_certificate_authority.py
================================================
"""create certificate authority
Revision ID: 3061e56045eb
Revises: 3fb4a904979c
Create Date: 2018-06-30 20:53:58.016051
"""
# From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = '3061e56045eb'
down_revision = '3fb4a904979c'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
op.create_table('certificate_authority',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('common_name', sa.String(), nullable=True),
# NOTE: certificate serials are still string but this remains as BigInteger because the counter is incremented
# manually.
sa.Column('serial', sa.BigInteger(), nullable=True),
sa.Column('validity_period', sa.Integer(), nullable=True),
sa.Column('certificate_id', sa.Integer(), nullable=True),
sa.Column('rsa_private_key_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['certificate_id'], ['certificates.id'], ),
sa.ForeignKeyConstraint(['rsa_private_key_id'], ['rsa_private_keys.id'], ),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('common_name')
)
def schema_downgrades():
op.drop_table('certificate_authority')
# def data_upgrades():
# """Add any optional data upgrade migrations here!"""
# pass
#
#
# def data_downgrades():
# """Add any optional data downgrade migrations here!"""
# pass
================================================
FILE: commandment/alembic/versions/3dbf6db7f9eb_application_tags.py
================================================
"""application_tags
Revision ID: 3dbf6db7f9eb
Revises: 7cf5787a089e
Create Date: 2019-01-08 20:51:11.845673
"""
# From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = '3dbf6db7f9eb'
down_revision = '7cf5787a089e'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
"""schema upgrade migrations go here."""
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('application_tags',
sa.Column('application_id', sa.Integer(), nullable=True),
sa.Column('tag_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['application_id'], ['applications.id'], ),
sa.ForeignKeyConstraint(['tag_id'], ['tags.id'], )
)
def schema_downgrades():
"""schema downgrade migrations go here."""
op.drop_table('application_tags')
================================================
FILE: commandment/alembic/versions/3fb4a904979c_general_cleanup.py
================================================
"""general cleanup
Revision ID: 3fb4a904979c
Revises: 1532dff16984
Create Date: 2018-03-13 21:27:55.983564
"""
# From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = '3fb4a904979c'
down_revision = '1532dff16984'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
"""schema upgrade migrations go here."""
op.drop_table('users')
op.drop_table('payload_dependencies')
def schema_downgrades():
"""schema downgrade migrations go here."""
op.create_table('payload_dependencies',
sa.Column('payload_uuid', sa.CHAR(length=32), nullable=True),
sa.Column('depends_on_payload_uuid', sa.CHAR(length=32), nullable=True),
sa.ForeignKeyConstraint(['depends_on_payload_uuid'], ['payloads.uuid'], ),
sa.ForeignKeyConstraint(['payload_uuid'], ['payloads.uuid'], )
)
op.create_table('users',
sa.Column('id', sa.INTEGER(), nullable=False),
sa.Column('name', sa.VARCHAR(), nullable=True),
sa.Column('fullname', sa.VARCHAR(), nullable=True),
sa.Column('password', sa.VARCHAR(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.drop_table('dep_configurations')
op.drop_table('mdm_payload')
op.drop_table('certificate_payload')
op.drop_table('command_sequences')
def data_upgrades():
"""Add any optional data upgrade migrations here!"""
pass
def data_downgrades():
"""Add any optional data downgrade migrations here!"""
pass
================================================
FILE: commandment/alembic/versions/50188ffaf0cd_create_devices_table.py
================================================
"""Create devices table
Revision ID: 50188ffaf0cd
Revises: 71ecf957301a
Create Date: 2017-05-19 19:39:22.021264
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '50188ffaf0cd'
down_revision = '71ecf957301a'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('devices',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('udid', sa.String(), nullable=True),
sa.Column('topic', sa.String(), nullable=True),
sa.Column('last_seen', sa.DateTime(), nullable=True),
sa.Column('is_enrolled', sa.Boolean(), nullable=True),
sa.Column('build_version', sa.String(), nullable=True),
sa.Column('device_name', sa.String(), nullable=True),
sa.Column('model', sa.String(), nullable=True),
sa.Column('model_name', sa.String(), nullable=True),
sa.Column('os_version', sa.String(), nullable=True),
sa.Column('product_name', sa.String(), nullable=True),
sa.Column('serial_number', sa.String(length=64), nullable=True),
sa.Column('hostname', sa.String(), nullable=True),
sa.Column('local_hostname', sa.String(), nullable=True),
sa.Column('available_device_capacity', sa.Float(), nullable=True),
sa.Column('device_capacity', sa.Float(), nullable=True),
sa.Column('wifi_mac', sa.String(), nullable=True),
sa.Column('bluetooth_mac', sa.String(), nullable=True),
sa.Column('awaiting_configuration', sa.Boolean(), nullable=True),
sa.Column('push_magic', sa.String(), nullable=True),
sa.Column('_token', sa.String(), nullable=True),
sa.Column('tokenupdate_at', sa.DateTime(), nullable=True),
sa.Column('last_push_at', sa.DateTime(), nullable=True),
sa.Column('last_apns_id', sa.Integer(), nullable=True),
sa.Column('failed_push_count', sa.Integer(), nullable=False),
sa.Column('unlock_token', sa.String(), nullable=True),
sa.Column('passcode_present', sa.Boolean(), nullable=True),
sa.Column('passcode_compliant', sa.Boolean(), nullable=True),
sa.Column('passcode_compliant_with_profiles', sa.Boolean(), nullable=True),
sa.Column('fde_enabled', sa.Boolean(), nullable=True),
sa.Column('fde_has_prk', sa.Boolean(), nullable=True),
sa.Column('fde_has_irk', sa.Boolean(), nullable=True),
sa.Column('fde_personal_recovery_key_cms', sa.LargeBinary(), nullable=True),
sa.Column('fde_personal_recovery_key_device_key', sa.String(), nullable=True),
sa.Column('firewall_enabled', sa.Boolean(), nullable=True),
sa.Column('block_all_incoming', sa.Boolean(), nullable=True),
sa.Column('stealth_mode_enabled', sa.Boolean(), nullable=True),
sa.Column('sip_enabled', sa.Boolean(), nullable=True),
sa.Column('certificate_id', sa.Integer(), nullable=True),
sa.Column('battery_level', sa.Float(), nullable=True),
sa.Column('carrier_settings_version', sa.String(), nullable=True),
sa.Column('cellular_technology', sa.Enum('Nothing', 'GSM', 'CDMA', 'Both', name='cellulartechnology'), nullable=True),
sa.Column('current_carrier_network', sa.String(), nullable=True),
sa.Column('current_mcc', sa.String(), nullable=True),
sa.Column('current_mnc', sa.String(), nullable=True),
sa.Column('data_roaming_enabled', sa.Boolean(), nullable=True),
sa.Column('device_id', sa.String(), nullable=True),
sa.Column('eas_device_identifier', sa.String(), nullable=True),
sa.Column('iccid', sa.String(), nullable=True),
sa.Column('imei', sa.String(), nullable=True),
sa.Column('is_activation_lock_enabled', sa.Boolean(), nullable=True),
sa.Column('is_cloud_backup_enabled', sa.Boolean(), nullable=True),
sa.Column('is_device_locator_service_enabled', sa.Boolean(), nullable=True),
sa.Column('is_do_not_disturb_in_effect', sa.Boolean(), nullable=True),
sa.Column('is_mdm_lost_mode_enabled', sa.Boolean(), nullable=True),
sa.Column('is_roaming', sa.Boolean(), nullable=True),
sa.Column('is_supervised', sa.Boolean(), nullable=True),
sa.Column('itunes_store_account_hash', sa.String(), nullable=True),
sa.Column('itunes_store_account_is_active', sa.Boolean(), nullable=True),
sa.Column('last_cloud_backup_date', sa.DateTime(), nullable=True),
sa.Column('maximum_resident_users', sa.Integer(), nullable=True),
sa.Column('meid', sa.String(), nullable=True),
sa.Column('modem_firmware_version', sa.String(), nullable=True),
sa.Column('passcode_lock_grace_period_enforced', sa.Integer(), nullable=True),
sa.Column('personal_hotspot_enabled', sa.Boolean(), nullable=True),
sa.Column('phone_number', sa.String(), nullable=True),
sa.Column('sim_carrier_network', sa.String(), nullable=True),
sa.Column('subscriber_carrier_network', sa.String(), nullable=True),
sa.Column('subscriber_mcc', sa.String(), nullable=True),
sa.Column('subscriber_mnc', sa.String(), nullable=True),
sa.Column('voice_roaming_enabled', sa.Boolean(), nullable=True),
sa.Column('activation_lock_escrow_key', sa.String(), nullable=True),
sa.ForeignKeyConstraint(['certificate_id'], ['certificates.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_devices_serial_number'), 'devices', ['serial_number'], unique=False)
op.create_index(op.f('ix_devices_udid'), 'devices', ['udid'], unique=False)
def downgrade():
op.drop_index(op.f('ix_devices_udid'), table_name='devices')
op.drop_index(op.f('ix_devices_serial_number'), table_name='devices')
op.drop_table('devices')
================================================
FILE: commandment/alembic/versions/5b98cc4af6c9_create_profiles_table.py
================================================
"""Create profiles table
Revision ID: 5b98cc4af6c9
Revises: e78274be170e
Create Date: 2017-05-19 19:30:47.058720
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
# revision identifiers, used by Alembic.
revision = '5b98cc4af6c9'
down_revision = 'e78274be170e'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('profiles',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('data', sa.LargeBinary(), nullable=True),
sa.Column('payload_type', sa.String(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('display_name', sa.String(), nullable=True),
sa.Column('expiration_date', sa.DateTime(), nullable=True),
sa.Column('identifier', sa.String(), nullable=False),
sa.Column('organization', sa.String(), nullable=True),
sa.Column('uuid', commandment.dbtypes.GUID(), nullable=True),
sa.Column('removal_disallowed', sa.Boolean(), nullable=True),
sa.Column('version', sa.Integer(), nullable=True),
sa.Column('scope', sa.Enum('User', 'System', name='payloadscope'), nullable=True),
sa.Column('removal_date', sa.DateTime(), nullable=True),
sa.Column('duration_until_removal', sa.BigInteger(), nullable=True),
sa.Column('consent_en', sa.Text(), nullable=True),
sa.Column('is_encrypted', sa.Boolean(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_profiles_uuid'), 'profiles', ['uuid'], unique=True)
def downgrade():
op.drop_index(op.f('ix_profiles_uuid'), table_name='profiles')
op.drop_table('profiles')
================================================
FILE: commandment/alembic/versions/6675e981817e_create_available_os_updates_table.py
================================================
"""create available_os_updates table
Revision ID: 6675e981817e
Revises: 70ff84113e8f
Create Date: 2017-06-23 17:40:11.879267
"""
from alembic import op, context
import sqlalchemy as sa
import commandment.dbtypes
# revision identifiers, used by Alembic.
revision = '6675e981817e'
down_revision = '70ff84113e8f'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
"""schema upgrade migrations go here."""
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('available_os_updates',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('device_id', sa.Integer(), nullable=True),
sa.Column('allows_install_later', sa.Boolean(), nullable=True),
sa.Column('app_identifiers_to_close', commandment.dbtypes.JSONEncodedDict(), nullable=True),
sa.Column('human_readable_name', sa.String(), nullable=True),
sa.Column('human_readable_name_locale', sa.String(), nullable=True),
sa.Column('is_config_data_update', sa.Boolean(), nullable=True),
sa.Column('is_critical', sa.Boolean(), nullable=True),
sa.Column('is_firmware_update', sa.Boolean(), nullable=True),
sa.Column('metadata_url', sa.String(), nullable=True),
sa.Column('product_key', sa.String(), nullable=True),
sa.Column('restart_required', sa.Boolean(), nullable=True),
sa.Column('version', sa.String(), nullable=True),
sa.ForeignKeyConstraint(['device_id'], ['devices.id'], ),
sa.PrimaryKeyConstraint('id')
)
def schema_downgrades():
"""schema downgrade migrations go here."""
op.drop_table('available_os_updates')
def data_upgrades():
"""Add any optional data upgrade migrations here!"""
pass
def data_downgrades():
"""Add any optional data downgrade migrations here!"""
pass
================================================
FILE: commandment/alembic/versions/70ff84113e8f_create_tags.py
================================================
"""Create tags table and join tables
Revision ID: 70ff84113e8f
Revises: 7ae48ae412d7
Create Date: 2017-06-20 17:13:11.572353
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '70ff84113e8f'
down_revision = 'dd74229d17b9'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('tags',
sa.Column('id', sa.Integer(), nullable=False, autoincrement=True),
sa.Column('name', sa.String(), nullable=False),
sa.Column('color', sa.String(length=6), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('profile_tags',
sa.Column('profile_id', sa.Integer(), nullable=True),
sa.Column('tag_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['profile_id'], ['profiles.id'], ondelete="CASCADE"),
sa.ForeignKeyConstraint(['tag_id'], ['tags.id'], ondelete="CASCADE")
)
op.create_index(op.f('ix_profile_tags'), 'profile_tags', ['profile_id', 'tag_id'], unique=True)
op.create_table('device_tags',
sa.Column('device_id', sa.Integer(), nullable=True),
sa.Column('tag_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['device_id'], ['devices.id'], ondelete="CASCADE"),
sa.ForeignKeyConstraint(['tag_id'], ['tags.id'], ondelete="CASCADE")
)
op.create_index(op.f('ix_device_tags'), 'device_tags', ['device_id', 'tag_id'], unique=True)
def downgrade():
op.drop_index(op.f('ix_device_tags'), table_name='device_tags')
op.drop_table('device_tags')
op.drop_index(op.f('ix_profile_tags'), table_name='profile_tags')
op.drop_table('profile_tags')
op.drop_table('tags')
================================================
FILE: commandment/alembic/versions/71818e983100_create_application_sources_table.py
================================================
"""Create application_sources table
Revision ID: 71818e983100
Revises: da52b64b865f
Create Date: 2017-05-18 22:29:40.036227
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '71818e983100'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
op.create_table('application_sources',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(), nullable=True),
sa.Column('source_type', sa.Enum('S3', 'Munki', name='appsourcetype'), nullable=True),
sa.Column('endpoint', sa.String(), nullable=True),
sa.Column('mount_uri', sa.String(), nullable=True),
sa.Column('use_ssl', sa.Boolean(), nullable=True),
sa.Column('access_key', sa.String(), nullable=True),
sa.Column('secret_key', sa.String(), nullable=True),
sa.Column('bucket', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('application_sources')
================================================
FILE: commandment/alembic/versions/71ecf957301a_create_commands_table.py
================================================
"""Create commands table
Revision ID: 71ecf957301a
Revises: af4ba256efde
Create Date: 2017-05-19 19:38:21.450906
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
# revision identifiers, used by Alembic.
revision = '71ecf957301a'
down_revision = 'af4ba256efde'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('commands',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('request_type', sa.String(), nullable=False),
sa.Column('uuid', commandment.dbtypes.GUID(), nullable=False),
sa.Column('parameters', commandment.dbtypes.JSONEncodedDict(), nullable=True),
sa.Column('status', sa.String(length=40), nullable=False),
sa.Column('queued_at', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=True),
sa.Column('sent_at', sa.DateTime(), nullable=True),
sa.Column('acknowledged_at', sa.DateTime(), nullable=True),
sa.Column('after', sa.DateTime(), nullable=True),
sa.Column('ttl', sa.Integer(), nullable=False),
sa.Column('device_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['device_id'], ['devices.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_commands_status'), 'commands', ['status'], unique=False)
op.create_index(op.f('ix_commands_uuid'), 'commands', ['uuid'], unique=True)
def downgrade():
op.drop_index(op.f('ix_commands_uuid'), table_name='commands')
op.drop_index(op.f('ix_commands_status'), table_name='commands')
op.drop_table('commands')
================================================
FILE: commandment/alembic/versions/7ab500f58a76_create_installed_payloads.py
================================================
"""create installed_payloads
Revision ID: 7ab500f58a76
Revises: f029ac1af3f0
Create Date: 2017-07-19 14:17:49.094292
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = '7ab500f58a76'
down_revision = 'f029ac1af3f0'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
"""schema upgrade migrations go here."""
op.create_table('installed_payloads',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('profile_id', sa.Integer(), nullable=False),
sa.Column('device_id', sa.Integer(), nullable=False),
sa.Column('description', sa.String(), nullable=True),
sa.Column('display_name', sa.String(), nullable=True),
sa.Column('identifier', sa.String(), nullable=True),
sa.Column('organization', sa.String(), nullable=True),
sa.Column('payload_type', sa.String(), nullable=True),
sa.Column('uuid', commandment.dbtypes.GUID(), nullable=True),
sa.ForeignKeyConstraint(['device_id'], ['devices.id'], ondelete="CASCADE"),
sa.ForeignKeyConstraint(['profile_id'], ['installed_profiles.id'], ondelete="CASCADE"),
sa.PrimaryKeyConstraint('id')
)
def schema_downgrades():
"""schema downgrade migrations go here."""
op.drop_table('installed_payloads')
def data_upgrades():
"""Add any optional data upgrade migrations here!"""
pass
def data_downgrades():
"""Add any optional data downgrade migrations here!"""
pass
================================================
FILE: commandment/alembic/versions/7cf5787a089e_add_dep_profile_relationships.py
================================================
"""add dep profile relationships
Revision ID: 7cf5787a089e
Revises: b231394ab475
Create Date: 2018-11-06 21:11:54.606189
"""
# From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = '7cf5787a089e'
down_revision = 'b231394ab475'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
with op.batch_alter_table('dep_accounts', schema=None) as batch_op:
batch_op.add_column(sa.Column('default_dep_profile_id', sa.Integer(), nullable=True))
batch_op.create_foreign_key('fk_dep_accounts_default_dep_profile_id', 'dep_profiles', ['default_dep_profile_id'], ['id'])
with op.batch_alter_table('dep_profiles', schema=None) as batch_op:
batch_op.add_column(sa.Column('dep_account_id', sa.Integer(), nullable=True))
batch_op.add_column(sa.Column('skip_setup_items', commandment.dbtypes.JSONEncodedDict(), nullable=True))
batch_op.create_foreign_key('fk_dep_profiles_dep_account_id', 'dep_accounts', ['dep_account_id'], ['id'])
def schema_downgrades():
with op.batch_alter_table('dep_profiles', schema=None) as batch_op:
batch_op.drop_constraint('fk_dep_profiles_dep_account_id', 'dep_profiles', type_='foreignkey')
batch_op.drop_column('skip_setup_items')
batch_op.drop_column('dep_account_id')
with op.batch_alter_table('dep_accounts', schema=None) as batch_op:
batch_op.drop_constraint('fk_dep_accounts_default_dep_profile_id', 'dep_accounts', type_='foreignkey')
batch_op.drop_column('default_dep_profile_id')
================================================
FILE: commandment/alembic/versions/7d578eb75092_create_device_groups_table.py
================================================
"""Create device_groups table
Revision ID: 7d578eb75092
Revises: 71818e983100
Create Date: 2017-05-18 22:31:16.686848
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '7d578eb75092'
down_revision = '71818e983100'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('device_groups',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('device_groups')
================================================
FILE: commandment/alembic/versions/80fa1767c7e2_create_oauth_server_models.py
================================================
"""Create OAuth Server Models
Revision ID: 80fa1767c7e2
Revises: fa4d91c6aacf
Create Date: 2019-05-20 20:47:04.928849
"""
# From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = '80fa1767c7e2'
down_revision = 'fa4d91c6aacf'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
def downgrade():
schema_downgrades()
def schema_upgrades():
"""schema upgrade migrations go here."""
op.create_table('oauth2_clients',
sa.Column('client_id', sa.String(length=48), nullable=True),
sa.Column('client_secret', sa.String(length=120), nullable=True),
sa.Column('issued_at', sa.Integer(), nullable=False),
sa.Column('expires_at', sa.Integer(), nullable=False),
sa.Column('redirect_uri', sa.Text(), nullable=True),
sa.Column('token_endpoint_auth_method', sa.String(length=48), nullable=True),
sa.Column('grant_type', sa.Text(), nullable=False),
sa.Column('response_type', sa.Text(), nullable=False),
sa.Column('scope', sa.Text(), nullable=False),
sa.Column('client_name', sa.String(length=100), nullable=True),
sa.Column('client_uri', sa.Text(), nullable=True),
sa.Column('logo_uri', sa.Text(), nullable=True),
sa.Column('contact', sa.Text(), nullable=True),
sa.Column('tos_uri', sa.Text(), nullable=True),
sa.Column('policy_uri', sa.Text(), nullable=True),
sa.Column('jwks_uri', sa.Text(), nullable=True),
sa.Column('jwks_text', sa.Text(), nullable=True),
sa.Column('i18n_metadata', sa.Text(), nullable=True),
sa.Column('software_id', sa.String(length=36), nullable=True),
sa.Column('software_version', sa.String(length=48), nullable=True),
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='CASCADE'),
sa.PrimaryKeyConstraint('id')
)
with op.batch_alter_table('oauth2_clients', schema=None) as batch_op:
batch_op.create_index(batch_op.f('ix_oauth2_clients_client_id'), ['client_id'], unique=False)
op.create_table('oauth2_tokens',
sa.Column('client_id', sa.String(length=48), nullable=True),
sa.Column('token_type', sa.String(length=40), nullable=True),
sa.Column('access_token', sa.String(length=255), nullable=False),
sa.Column('refresh_token', sa.String(length=255), nullable=True),
sa.Column('scope', sa.Text(), nullable=True),
sa.Column('revoked', sa.Boolean(), nullable=True),
sa.Column('issued_at', sa.Integer(), nullable=False),
sa.Column('expires_in', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='CASCADE'),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('access_token')
)
with op.batch_alter_table('oauth2_tokens', schema=None) as batch_op:
batch_op.create_index(batch_op.f('ix_oauth2_tokens_refresh_token'), ['refresh_token'], unique=False)
op.create_table('users',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(), nullable=True),
sa.Column('fullname', sa.String(), nullable=True),
sa.Column('password', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
def schema_downgrades():
op.drop_table('users')
with op.batch_alter_table('oauth2_tokens', schema=None) as batch_op:
batch_op.drop_index(batch_op.f('ix_oauth2_tokens_refresh_token'))
op.drop_table('oauth2_tokens')
with op.batch_alter_table('oauth2_clients', schema=None) as batch_op:
batch_op.drop_index(batch_op.f('ix_oauth2_clients_client_id'))
op.drop_table('oauth2_clients')
================================================
FILE: commandment/alembic/versions/875dcce0bf8b_create_vpp_users.py
================================================
"""Create vpp_users table
Revision ID: 875dcce0bf8b
Revises: a2e0af380181
Create Date: 2017-07-19 12:56:02.203987
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = '875dcce0bf8b'
down_revision = 'a2e0af380181'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
"""schema upgrade migrations go here."""
op.create_table('vpp_users',
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('client_user_id', commandment.dbtypes.GUID(), nullable=False),
sa.Column('email', sa.String(), nullable=True),
sa.Column('status', sa.Enum('Registered', 'Associated', 'Retired', 'Deleted', name='vppuserstatus'), nullable=True),
sa.Column('invite_url', sa.String(), nullable=True),
sa.Column('invite_code', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('user_id')
)
def schema_downgrades():
"""schema downgrade migrations go here."""
op.drop_table('vpp_users')
def data_upgrades():
"""Add any optional data upgrade migrations here!"""
pass
def data_downgrades():
"""Add any optional data downgrade migrations here!"""
pass
================================================
FILE: commandment/alembic/versions/8c866896f76e_create_dep_join_tables.py
================================================
"""empty message
Revision ID: 8c866896f76e
Revises: 0e5babc5b9ee
Create Date: 2017-07-19 12:57:58.086196
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = '8c866896f76e'
down_revision = '0e5babc5b9ee'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
"""schema upgrade migrations go here."""
op.create_table('dep_profile_anchor_certificates',
sa.Column('dep_profile_id', sa.Integer(), nullable=True),
sa.Column('certificate_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['certificate_id'], ['certificates.id'], ),
sa.ForeignKeyConstraint(['dep_profile_id'], ['dep_profiles.id'], )
)
op.create_table('dep_profile_supervision_certificates',
sa.Column('dep_profile_id', sa.Integer(), nullable=True),
sa.Column('certificate_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['certificate_id'], ['certificates.id'], ),
sa.ForeignKeyConstraint(['dep_profile_id'], ['dep_profiles.id'], )
)
def schema_downgrades():
"""schema downgrade migrations go here."""
op.drop_table('dep_profile_supervision_certificates')
op.drop_table('dep_profile_anchor_certificates')
def data_upgrades():
"""Add any optional data upgrade migrations here!"""
pass
def data_downgrades():
"""Add any optional data downgrade migrations here!"""
pass
================================================
FILE: commandment/alembic/versions/__init__.py
================================================
================================================
FILE: commandment/alembic/versions/a1d5ffaa2092_create_installed_applications_table.py
================================================
"""Create installed_applications table
Revision ID: a1d5ffaa2092
Revises: a35eeb5a216e
Create Date: 2017-05-19 19:43:10.092363
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
# revision identifiers, used by Alembic.
revision = 'a1d5ffaa2092'
down_revision = 'a35eeb5a216e'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('installed_applications',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('device_udid', sa.String(40), nullable=False),
sa.Column('device_id', sa.Integer(), nullable=True),
sa.Column('bundle_identifier', sa.String(), nullable=True),
sa.Column('version', sa.String(), nullable=True),
sa.Column('short_version', sa.String(), nullable=True),
sa.Column('name', sa.String(), nullable=True),
sa.Column('bundle_size', sa.BigInteger(), nullable=True),
sa.Column('dynamic_size', sa.BigInteger(), nullable=True),
sa.Column('is_validated', sa.Boolean(), nullable=True),
sa.Column('external_version_identifier', sa.BigInteger(), nullable=True),
sa.ForeignKeyConstraint(['device_id'], ['devices.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_installed_applications_bundle_identifier'), 'installed_applications', ['bundle_identifier'], unique=False)
op.create_index(op.f('ix_installed_applications_device_udid'), 'installed_applications', ['device_udid'], unique=False)
op.create_index(op.f('ix_installed_applications_version'), 'installed_applications', ['version'], unique=False)
def downgrade():
op.drop_index(op.f('ix_installed_applications_version'), table_name='installed_applications')
op.drop_index(op.f('ix_installed_applications_device_udid'), table_name='installed_applications')
op.drop_index(op.f('ix_installed_applications_bundle_identifier'), table_name='installed_applications')
op.drop_table('installed_applications')
================================================
FILE: commandment/alembic/versions/a2e0af380181_create_dep_profiles.py
================================================
"""Create dep_profiles table
Revision ID: a2e0af380181
Revises: 6675e981817e
Create Date: 2017-07-19 12:50:41.318647
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = 'a2e0af380181'
down_revision = '6675e981817e'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
"""schema upgrade migrations go here."""
op.create_table('dep_profiles',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('uuid', commandment.dbtypes.GUID(), nullable=True),
sa.Column('profile_name', sa.String(), nullable=False),
sa.Column('url', sa.String(), nullable=False),
sa.Column('allow_pairing', sa.Boolean(), nullable=True),
sa.Column('is_supervised', sa.Boolean(), nullable=True),
sa.Column('is_multi_user', sa.Boolean(), nullable=True),
sa.Column('is_mandatory', sa.Boolean(), nullable=True),
sa.Column('await_device_configured', sa.Boolean(), nullable=True),
sa.Column('is_mdm_removable', sa.Boolean(), nullable=True),
sa.Column('support_phone_number', sa.String(), nullable=True),
sa.Column('auto_advance_setup', sa.Boolean(), nullable=True),
sa.Column('support_email_address', sa.String(), nullable=True),
sa.Column('org_magic', sa.String(), nullable=True),
sa.Column('department', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_dep_profiles_uuid'), 'dep_profiles', ['uuid'], unique=False)
# op.create_foreign_key(None, 'devices', 'dep_profiles', ['dep_profile_id'], ['id'])
def schema_downgrades():
"""schema downgrade migrations go here."""
op.drop_index(op.f('ix_dep_profiles_uuid'), table_name='dep_profiles')
op.drop_table('dep_profiles')
# op.drop_constraint(None, 'devices', type_='foreignkey')
def data_upgrades():
"""Add any optional data upgrade migrations here!"""
pass
def data_downgrades():
"""Add any optional data downgrade migrations here!"""
pass
================================================
FILE: commandment/alembic/versions/a35eeb5a216e_create_installed_profiles_table.py
================================================
"""Create installed_profiles table
Revision ID: a35eeb5a216e
Revises: e16577adc4fd
Create Date: 2017-05-19 19:41:46.995463
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
# revision identifiers, used by Alembic.
revision = 'a35eeb5a216e'
down_revision = 'e16577adc4fd'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('installed_profiles',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('device_udid', sa.String(40), nullable=False),
sa.Column('device_id', sa.Integer(), nullable=True),
sa.Column('has_removal_password', sa.Boolean(), nullable=True),
sa.Column('is_encrypted', sa.Boolean(), nullable=True),
sa.Column('is_managed', sa.Boolean(), nullable=True),
sa.Column('payload_description', sa.String(), nullable=True),
sa.Column('payload_display_name', sa.String(), nullable=True),
sa.Column('payload_identifier', sa.String(), nullable=True),
sa.Column('payload_organization', sa.String(), nullable=True),
sa.Column('payload_removal_disallowed', sa.Boolean(), nullable=True),
sa.Column('payload_uuid', commandment.dbtypes.GUID(), nullable=True),
sa.ForeignKeyConstraint(['device_id'], ['devices.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_installed_profiles_device_udid'), 'installed_profiles', ['device_udid'], unique=False)
op.create_index(op.f('ix_installed_profiles_payload_uuid'), 'installed_profiles', ['payload_uuid'], unique=False)
def downgrade():
op.drop_index(op.f('ix_installed_profiles_payload_uuid'), table_name='installed_profiles')
op.drop_index(op.f('ix_installed_profiles_device_udid'), table_name='installed_profiles')
op.drop_table('installed_profiles')
================================================
FILE: commandment/alembic/versions/a3ddaad5c358_add_dep_device_columns.py
================================================
"""Add DEP device columns
Revision ID: a3ddaad5c358
Revises: 2808deb9fc62
Create Date: 2018-07-04 21:44:41.549806
"""
# From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = 'a3ddaad5c358'
down_revision = '2808deb9fc62'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
op.add_column('devices', sa.Column('description', sa.String(), nullable=True))
op.add_column('devices', sa.Column('asset_tag', sa.String(), nullable=True))
op.add_column('devices', sa.Column('color', sa.String(), nullable=True))
op.add_column('devices', sa.Column('device_assigned_by', sa.String(), nullable=True))
op.add_column('devices', sa.Column('device_assigned_date', sa.DateTime(), nullable=True))
op.add_column('devices', sa.Column('device_family', sa.String(), nullable=True))
op.add_column('devices', sa.Column('is_dep', sa.Boolean(), nullable=True))
op.add_column('devices', sa.Column('os', sa.String(), nullable=True))
op.add_column('devices', sa.Column('profile_assign_time', sa.DateTime(), nullable=True))
op.add_column('devices', sa.Column('profile_push_time', sa.DateTime(), nullable=True))
op.add_column('devices', sa.Column('profile_status', sa.String(), nullable=True))
op.add_column('devices', sa.Column('profile_uuid', sa.String(), nullable=True))
def schema_downgrades():
op.drop_column('devices', 'profile_uuid')
op.drop_column('devices', 'profile_status')
op.drop_column('devices', 'profile_push_time')
op.drop_column('devices', 'profile_assign_time')
op.drop_column('devices', 'os')
op.drop_column('devices', 'is_dep')
op.drop_column('devices', 'device_family')
op.drop_column('devices', 'device_assigned_date')
op.drop_column('devices', 'device_assigned_by')
op.drop_column('devices', 'color')
op.drop_column('devices', 'asset_tag')
op.drop_column('devices', 'description')
# def data_upgrades():
# """Add any optional data upgrade migrations here!"""
# pass
#
#
# def data_downgrades():
# """Add any optional data downgrade migrations here!"""
# pass
================================================
FILE: commandment/alembic/versions/af4ba256efde_create_certificates_table.py
================================================
"""Create certificates table
Revision ID: af4ba256efde
Revises: 0ab46b2f6d8c
Create Date: 2017-05-19 19:36:12.171390
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'af4ba256efde'
down_revision = '0ab46b2f6d8c'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('certificates',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('pem_data', sa.Text(), nullable=False),
sa.Column('rsa_private_key_id', sa.Integer(), nullable=True),
sa.Column('x509_cn', sa.String(length=64), nullable=True),
sa.Column('x509_ou', sa.String(length=32), nullable=True),
sa.Column('x509_o', sa.String(length=64), nullable=True),
sa.Column('x509_c', sa.String(length=2), nullable=True),
sa.Column('x509_st', sa.String(length=128), nullable=True),
sa.Column('not_before', sa.DateTime(), nullable=False),
sa.Column('not_after', sa.DateTime(), nullable=False),
# NOTE: serial was changed from BigInteger because cryptography could generate a serial number at
# random that could produce an integer overflow.
sa.Column('serial', sa.String(), nullable=True),
sa.Column('fingerprint', sa.String(length=64), nullable=False),
sa.Column('push_topic', sa.String(), nullable=True),
sa.Column('discriminator', sa.String(length=20), nullable=True),
sa.ForeignKeyConstraint(['rsa_private_key_id'], ['rsa_private_keys.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_certificates_fingerprint'), 'certificates', ['fingerprint'], unique=False)
def downgrade():
op.drop_index(op.f('ix_certificates_fingerprint'), table_name='certificates')
op.drop_table('certificates')
================================================
FILE: commandment/alembic/versions/b231394ab475_add_scep_config_source_types.py
================================================
"""add scep_config source types
Revision ID: b231394ab475
Revises: a3ddaad5c358
Create Date: 2018-09-07 07:50:10.467330
"""
# From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = 'b231394ab475'
down_revision = 'a3ddaad5c358'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
def downgrade():
schema_downgrades()
def schema_upgrades():
op.add_column('scep_config', sa.Column('source_type', sa.Enum('InternalPKCS12', 'InternalSCEP', 'ExternalSCEP', name='deviceidentitysources'), nullable=True))
def schema_downgrades():
op.drop_column('scep_config', 'source_type')
================================================
FILE: commandment/alembic/versions/b74ca08cfd9a_create_applications_tables.py
================================================
"""create applications tables
Revision ID: b74ca08cfd9a
Revises: 2f1507bf6dc1
Create Date: 2017-10-19 21:26:19.927682
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = 'b74ca08cfd9a'
down_revision = '2f1507bf6dc1'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
"""schema upgrade migrations go here."""
op.create_table('applications',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('display_name', sa.String(), nullable=False),
sa.Column('description', sa.String(), nullable=True),
sa.Column('version', sa.String(), nullable=True),
sa.Column('itunes_store_id', sa.Integer(), nullable=True),
sa.Column('bundle_id', sa.String(), nullable=False),
sa.Column('purchase_method', sa.Integer(), nullable=True),
sa.Column('manifest_url', sa.String(), nullable=True),
sa.Column('management_flags', sa.Integer(), nullable=True),
sa.Column('change_management_state', sa.String(), nullable=True),
sa.Column('discriminator', sa.String(length=20), nullable=True),
sa.Column('country', sa.String(length=2), nullable=True),
sa.Column('artist_id', sa.Integer(), nullable=True),
sa.Column('artist_name', sa.String(), nullable=True),
sa.Column('artist_view_url', sa.String(), nullable=True),
sa.Column('artwork_url60', sa.String(), nullable=True),
sa.Column('artwork_url100', sa.String(), nullable=True),
sa.Column('artwork_url512', sa.String(), nullable=True),
sa.Column('release_notes', sa.Text(), nullable=True),
sa.Column('release_date', sa.DateTime(), nullable=True),
sa.Column('minimum_os_version', sa.String(), nullable=True),
sa.Column('file_size_bytes', sa.BigInteger(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_applications_bundle_id'), 'applications', ['bundle_id'], unique=False)
op.create_index(op.f('ix_applications_discriminator'), 'applications', ['discriminator'], unique=False)
def schema_downgrades():
"""schema downgrade migrations go here."""
op.drop_index(op.f('ix_applications_discriminator'), table_name='applications')
op.drop_index(op.f('ix_applications_bundle_id'), table_name='applications')
op.drop_table('applications')
# ### end Alembic commands ###
def data_upgrades():
"""Add any optional data upgrade migrations here!"""
pass
def data_downgrades():
"""Add any optional data downgrade migrations here!"""
pass
================================================
FILE: commandment/alembic/versions/ba4849d8c8ad_create_device_group_devices_table.py
================================================
"""Create device_group_devices table
Revision ID: ba4849d8c8ad
Revises: a1d5ffaa2092
Create Date: 2017-05-19 19:44:37.403554
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'ba4849d8c8ad'
down_revision = 'a1d5ffaa2092'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('device_group_devices',
sa.Column('device_group_id', sa.Integer(), nullable=False),
sa.Column('device_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['device_group_id'], ['device_groups.id'], ),
sa.ForeignKeyConstraint(['device_id'], ['devices.id'], ),
sa.PrimaryKeyConstraint('device_group_id', 'device_id')
)
def downgrade():
op.drop_table('device_group_devices')
================================================
FILE: commandment/alembic/versions/d5b32b5cc74e_add_dep_profile_id_to_device.py
================================================
"""add dep profile id to device
Revision ID: d5b32b5cc74e
Revises: 1005dc7dea01
Create Date: 2018-03-13 21:16:23.964086
"""
# From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = 'd5b32b5cc74e'
down_revision = '1005dc7dea01'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
"""schema upgrade migrations go here."""
op.add_column('devices', sa.Column('dep_profile_id', sa.Integer(), nullable=True))
# Unsupported on SQLite3
# op.create_foreign_key(None, 'devices', 'dep_profiles', ['dep_profile_id'], ['id'])
def schema_downgrades():
"""schema downgrade migrations go here."""
# Unsupported on SQLite3
# op.drop_constraint(None, 'devices', type_='foreignkey')
op.drop_column('devices', 'dep_profile_id')
def data_upgrades():
"""Add any optional data upgrade migrations here!"""
pass
def data_downgrades():
"""Add any optional data downgrade migrations here!"""
pass
================================================
FILE: commandment/alembic/versions/dd74229d17b9_create_payload_dependencies_table.py
================================================
"""Create payload_dependencies table
Revision ID: dd74229d17b9
Revises: d65049bf4b91
Create Date: 2017-05-19 20:02:17.116286
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
# revision identifiers, used by Alembic.
revision = 'dd74229d17b9'
down_revision = 'e5840df9a88a'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('payload_dependencies',
sa.Column('payload_uuid', commandment.dbtypes.GUID(), nullable=True),
sa.Column('depends_on_payload_uuid', commandment.dbtypes.GUID(), nullable=True),
sa.ForeignKeyConstraint(['depends_on_payload_uuid'], ['payloads.uuid'], ),
sa.ForeignKeyConstraint(['payload_uuid'], ['payloads.uuid'], )
)
def downgrade():
op.drop_table('payload_dependencies')
================================================
FILE: commandment/alembic/versions/e16577adc4fd_create_installed_certificates_table.py
================================================
"""Create installed_certificates table
Revision ID: e16577adc4fd
Revises: 50188ffaf0cd
Create Date: 2017-05-19 19:40:56.436486
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
# revision identifiers, used by Alembic.
revision = 'e16577adc4fd'
down_revision = '50188ffaf0cd'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('installed_certificates',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('device_udid', sa.String(40), nullable=False),
sa.Column('device_id', sa.Integer(), nullable=True),
sa.Column('x509_cn', sa.String(), nullable=True),
sa.Column('is_identity', sa.Boolean(), nullable=True),
sa.Column('der_data', sa.LargeBinary(), nullable=False),
sa.Column('fingerprint_sha256', sa.String(length=64), nullable=False),
sa.ForeignKeyConstraint(['device_id'], ['devices.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_installed_certificates_device_udid'), 'installed_certificates', ['device_udid'], unique=False)
op.create_index(op.f('ix_installed_certificates_fingerprint_sha256'), 'installed_certificates', ['fingerprint_sha256'], unique=False)
def downgrade():
op.drop_index(op.f('ix_installed_certificates_fingerprint_sha256'), table_name='installed_certificates')
op.drop_index(op.f('ix_installed_certificates_device_udid'), table_name='installed_certificates')
op.drop_table('installed_certificates')
================================================
FILE: commandment/alembic/versions/e5840df9a88a_create_scep_payload_table.py
================================================
"""Create scep_payload table
Revision ID: e5840df9a88a
Revises: fc0c134cbb2e
Create Date: 2017-05-19 19:58:54.048729
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
# revision identifiers, used by Alembic.
revision = 'e5840df9a88a'
down_revision = '13358fb3846b'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('scep_payload',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('url', sa.String(), nullable=False),
sa.Column('name', sa.String(), nullable=True),
sa.Column('subject', commandment.dbtypes.JSONEncodedDict(), nullable=False),
sa.Column('challenge', sa.String(), nullable=True),
sa.Column('key_size', sa.Integer(), nullable=False),
sa.Column('ca_fingerprint', sa.LargeBinary(), nullable=True),
sa.Column('key_type', sa.String(), nullable=False),
sa.Column('key_usage', sa.Enum('Signing', 'Encryption', 'All', name='keyusage'), nullable=True),
sa.Column('subject_alt_name', sa.String(), nullable=True),
sa.Column('retries', sa.Integer(), nullable=False),
sa.Column('retry_delay', sa.Integer(), nullable=False),
sa.Column('certificate_renewal_time_interval', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['id'], ['payloads.id'], ),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('scep_payload')
================================================
FILE: commandment/alembic/versions/e58afdc17baa_create_rsa_private_keys_table.py
================================================
"""Create rsa_private_keys table
Revision ID: e58afdc17baa
Revises: 5b98cc4af6c9
Create Date: 2017-05-19 19:32:28.454940
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'e58afdc17baa'
down_revision = '5b98cc4af6c9'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('rsa_private_keys',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('pem_data', sa.Text(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('rsa_private_keys')
================================================
FILE: commandment/alembic/versions/e78274be170e_create_organizations_table.py
================================================
"""Create organizations table
Revision ID: e78274be170e
Revises: e9b0a4f7b595
Create Date: 2017-05-19 19:28:42.596244
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import table
from alembic import context
# revision identifiers, used by Alembic.
revision = 'e78274be170e'
down_revision = 'e9b0a4f7b595'
branch_labels = None
depends_on = None
TABLE = (
'organizations',
sa.Column('id', sa.Integer(), nullable=False, autoincrement=True),
sa.Column('name', sa.String(), nullable=True),
sa.Column('payload_prefix', sa.String(), nullable=True),
sa.Column('x509_ou', sa.String(length=32), nullable=True),
sa.Column('x509_o', sa.String(length=64), nullable=True),
sa.Column('x509_st', sa.String(length=128), nullable=True),
sa.Column('x509_c', sa.String(length=2), nullable=True),
sa.PrimaryKeyConstraint('id')
)
DEMO_ORGANIZATION = {
'name': 'Commandment Inc',
'payload_prefix': 'dev.commandment',
'x509_c': 'US',
'x509_o': 'Commandment',
'x509_ou': 'MDM'
}
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
op.create_table(*TABLE)
def schema_downgrades():
op.drop_table('organizations')
def data_upgrades():
tbl = table(*TABLE[:-1])
op.bulk_insert(tbl, [
DEMO_ORGANIZATION
])
def data_downgrades():
pass
================================================
FILE: commandment/alembic/versions/e947cdf82307_add_ios_installed_application_fields.py
================================================
"""add ios installed application fields
Revision ID: e947cdf82307
Revises: 3061e56045eb
Create Date: 2018-07-01 20:30:53.621855
"""
# From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = 'e947cdf82307'
down_revision = '3061e56045eb'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
op.add_column('installed_applications', sa.Column('adhoc_codesigned', sa.Boolean(), nullable=True))
op.add_column('installed_applications', sa.Column('appstore_vendable', sa.Boolean(), nullable=True))
op.add_column('installed_applications', sa.Column('beta_app', sa.Boolean(), nullable=True))
op.add_column('installed_applications', sa.Column('device_based_vpp', sa.Boolean(), nullable=True))
op.add_column('installed_applications', sa.Column('has_update_available', sa.Boolean(), nullable=True))
op.add_column('installed_applications', sa.Column('installing', sa.Boolean(), nullable=True))
op.create_index(op.f('ix_installed_applications_external_version_identifier'), 'installed_applications',
['external_version_identifier'], unique=False)
def schema_downgrades():
op.drop_index(op.f('ix_installed_applications_external_version_identifier'), table_name='installed_applications')
op.drop_column('installed_applications', 'installing')
op.drop_column('installed_applications', 'has_update_available')
op.drop_column('installed_applications', 'device_based_vpp')
op.drop_column('installed_applications', 'beta_app')
op.drop_column('installed_applications', 'appstore_vendable')
op.drop_column('installed_applications', 'adhoc_codesigned')
# def data_upgrades():
# """Add any optional data upgrade migrations here!"""
# pass
#
#
# def data_downgrades():
# """Add any optional data downgrade migrations here!"""
# pass
================================================
FILE: commandment/alembic/versions/e9b0a4f7b595_create_payloads_table.py
================================================
"""Create payloads table
Revision ID: e9b0a4f7b595
Revises: 0c4c448f4daf
Create Date: 2017-05-18 22:34:37.838655
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
# revision identifiers, used by Alembic.
revision = 'e9b0a4f7b595'
down_revision = '0c4c448f4daf'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('payloads',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('type', sa.String(), nullable=False),
sa.Column('version', sa.Integer(), nullable=True),
sa.Column('identifier', sa.String(), nullable=True),
sa.Column('uuid', commandment.dbtypes.GUID(), nullable=False),
sa.Column('display_name', sa.String(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('organization', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_payloads_type'), 'payloads', ['type'], unique=False)
op.create_index(op.f('ix_payloads_uuid'), 'payloads', ['uuid'], unique=False)
def downgrade():
op.drop_index(op.f('ix_payloads_uuid'), table_name='payloads')
op.drop_index(op.f('ix_payloads_type'), table_name='payloads')
op.drop_table('payloads')
================================================
FILE: commandment/alembic/versions/ea34ae3f1e7e_create_profile_payloads_table.py
================================================
"""Create profile_payloads table
Revision ID: ea34ae3f1e7e
Revises: ba4849d8c8ad
Create Date: 2017-05-19 19:45:34.375475
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'ea34ae3f1e7e'
down_revision = 'ba4849d8c8ad'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('profile_payloads',
sa.Column('profile_id', sa.Integer(), nullable=True),
sa.Column('payload_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['payload_id'], ['payloads.id'], ),
sa.ForeignKeyConstraint(['profile_id'], ['profiles.id'], )
)
def downgrade():
op.drop_table('profile_payloads')
================================================
FILE: commandment/alembic/versions/f029ac1af3f0_create_vpp_accounts.py
================================================
"""Create vpp_accounts table
Revision ID: f029ac1af3f0
Revises: 8c866896f76e
Create Date: 2017-07-19 13:02:13.563903
"""
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = 'f029ac1af3f0'
down_revision = '8c866896f76e'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
"""schema upgrade migrations go here."""
op.create_table('vpp_accounts',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('stoken', sa.String(), nullable=False),
sa.Column('licenses_since_modified_token', sa.String(), nullable=True),
sa.Column('licenses_batch_token', sa.String(), nullable=True),
sa.Column('users_since_modified_token', sa.String(), nullable=True),
sa.Column('users_batch_token', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
def schema_downgrades():
"""schema downgrade migrations go here."""
op.drop_table('vpp_accounts')
def data_upgrades():
"""Add any optional data upgrade migrations here!"""
pass
def data_downgrades():
"""Add any optional data downgrade migrations here!"""
pass
================================================
FILE: commandment/alembic/versions/f5237c7e2374_create_scep_config_table.py
================================================
"""Create scep_config table
Revision ID: f5237c7e2374
Revises: e58afdc17baa
Create Date: 2017-05-19 19:34:00.120370
"""
from alembic import op, context
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'f5237c7e2374'
down_revision = 'e58afdc17baa'
branch_labels = None
depends_on = None
TABLE = ('scep_config',
sa.Column('id', sa.Integer(), nullable=False, autoincrement=True),
sa.Column('url', sa.String(), nullable=False),
sa.Column('challenge_enabled', sa.Boolean(), nullable=True),
sa.Column('challenge', sa.String(), nullable=True),
sa.Column('ca_fingerprint', sa.String(), nullable=True),
sa.Column('subject', sa.String(), nullable=False),
sa.Column('key_size', sa.Integer(), nullable=False),
sa.Column('key_type', sa.String(), nullable=False, server_default='RSA'),
sa.Column('key_usage', sa.Enum('Signing', 'Encryption', 'All', name='keyusage'), nullable=True),
sa.Column('retries', sa.Integer(), nullable=False),
sa.Column('retry_delay', sa.Integer(), nullable=False),
sa.Column('certificate_renewal_time_interval', sa.Integer(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
DEMO_SCEP_CONFIG = {
'url': 'http://localhost:5000',
'challenge_enabled': True,
'challenge': 'sekret',
'subject': 'CN=%HardwareUUID%',
'key_size': 2048,
'key_type': 'RSA',
'key_usage': 'All',
'retries': 3,
'retry_delay': 10,
'certificate_renewal_time_interval': 24
}
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
op.create_table(*TABLE)
def schema_downgrades():
op.drop_table('scep_config')
def data_upgrades():
tbl = sa.table(*TABLE[:-1])
op.bulk_insert(tbl, [
DEMO_SCEP_CONFIG
])
def data_downgrades():
pass
================================================
FILE: commandment/alembic/versions/f8eb70b3aa2b_create_application_manifests.py
================================================
"""create application manifests
Revision ID: f8eb70b3aa2b
Revises: d5b32b5cc74e
Create Date: 2018-03-13 21:21:31.277764
"""
# From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = 'f8eb70b3aa2b'
down_revision = 'd5b32b5cc74e'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_upgrades()
def downgrade():
# if context.get_x_argument(as_dictionary=True).get('data', None):
# data_downgrades()
schema_downgrades()
def schema_upgrades():
"""schema upgrade migrations go here."""
# op.alter_column('application_manifest_checksums', 'application_manifest_id',
# existing_type=sa.INTEGER(),
# nullable=True)
#op.drop_constraint('uq_application_checksum_index', 'application_manifest_checksums', type_='unique')
#op.drop_constraint(None, 'application_manifest_checksums', type_='foreignkey')
#op.create_foreign_key(None, 'application_manifest_checksums', 'application_manifests', ['application_manifest_id'], ['id'])
# op.add_column('application_manifests', sa.Column('full_size_image_needs_shine', sa.Boolean(), nullable=True))
# op.add_column('application_manifests', sa.Column('full_size_image_url', sa.String(), nullable=True))
# op.alter_column('application_manifests', 'bundle_id',
# existing_type=sa.VARCHAR(),
# nullable=False)
op.create_index(op.f('ix_application_manifests_bundle_id'), 'application_manifests', ['bundle_id'], unique=False)
op.create_index(op.f('ix_application_manifests_bundle_version'), 'application_manifests', ['bundle_version'], unique=False)
# op.drop_constraint('uq_application_bundle_version', 'application_manifests', type_='unique')
#op.drop_column('application_manifests', 'full_image_url')
#op.drop_column('application_manifests', 'full_image_needs_shine')
def schema_downgrades():
"""schema downgrade migrations go here."""
#op.add_column('application_manifests', sa.Column('full_image_needs_shine', sa.BOOLEAN(), nullable=True))
#op.add_column('application_manifests', sa.Column('full_image_url', sa.VARCHAR(), nullable=True))
# op.create_unique_constraint('uq_application_bundle_version', 'application_manifests', ['bundle_id', 'bundle_version'])
op.drop_index(op.f('ix_application_manifests_bundle_version'), table_name='application_manifests')
op.drop_index(op.f('ix_application_manifests_bundle_id'), table_name='application_manifests')
# op.alter_column('application_manifests', 'bundle_id',
# existing_type=sa.VARCHAR(),
# nullable=True)
# op.drop_column('application_manifests', 'full_size_image_url')
# op.drop_column('application_manifests', 'full_size_image_needs_shine')
#op.drop_constraint(None, 'application_manifest_checksums', type_='foreignkey')
#op.create_foreign_key(None, 'application_manifest_checksums', 'application_manifests', ['application_manifest_id'], ['id'], ondelete='CASCADE')
#op.create_unique_constraint('uq_application_checksum_index', 'application_manifest_checksums', ['application_manifest_id', 'checksum_index'])
# op.alter_column('application_manifest_checksums', 'application_manifest_id',
# existing_type=sa.INTEGER(),
# nullable=False)
def data_upgrades():
"""Add any optional data upgrade migrations here!"""
pass
def data_downgrades():
"""Add any optional data downgrade migrations here!"""
pass
================================================
FILE: commandment/alembic/versions/fa4d91c6aacf_create_managed_applications_table.py
================================================
"""create_managed_applications_table
Revision ID: fa4d91c6aacf
Revises: 3dbf6db7f9eb
Create Date: 2019-01-10 10:01:10.750225
"""
# From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements
from alembic import op
import sqlalchemy as sa
import commandment.dbtypes
from alembic import context
# revision identifiers, used by Alembic.
revision = 'fa4d91c6aacf'
down_revision = '3dbf6db7f9eb'
branch_labels = None
depends_on = None
def upgrade():
schema_upgrades()
def downgrade():
schema_downgrades()
def schema_upgrades():
op.create_table('managed_applications',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('device_id', sa.Integer(), nullable=True),
sa.Column('bundle_id', sa.String(), nullable=True),
sa.Column('external_version_id', sa.Integer(), nullable=True),
sa.Column('has_configuration', sa.Boolean(), nullable=True),
sa.Column('has_feedback', sa.Boolean(), nullable=True),
sa.Column('is_validated', sa.Boolean(), nullable=True),
sa.Column('management_flags', sa.Integer(), nullable=True),
sa.Column('status', sa.String(), nullable=True),
sa.Column('application_id', sa.Integer(), nullable=True),
sa.Column('ia_command_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['application_id'], ['applications.id'], ),
sa.ForeignKeyConstraint(['device_id'], ['devices.id'], ),
sa.ForeignKeyConstraint(['ia_command_id'], ['commands.id'], ),
sa.PrimaryKeyConstraint('id')
)
def schema_downgrades():
op.drop_table('managed_applications')
================================================
FILE: commandment/api/__init__.py
================================================
================================================
FILE: commandment/api/app_json.py
================================================
"""
This module contains API endpoints which do not fit with the JSON-API specification.
"""
import io
from flask import Blueprint, send_file, abort, current_app, jsonify, request, make_response
from sqlalchemy.orm.exc import NoResultFound
import plistlib
import string
from commandment.plistutil.nonewriter import dumps as dumps_none
from base64 import urlsafe_b64encode
from commandment.models import db, Organization, Device, Command
from commandment.pki.models import Certificate, RSAPrivateKey
from commandment.profiles.models import Profile
from commandment.mdm import commands, Platform
from .schema import OrganizationFlatSchema
from commandment.profiles.schema import ProfileSchema
from commandment.profiles.plist_schema import ProfileSchema as ProfilePlistSchema
flat_api = Blueprint('flat_api', __name__)
# @flat_api.errorhandler(400)
# def bad_request(e):
# return jsonify({'errors': [
# {
# 'status': '400',
# 'title': str(e),
# }
# ]}
@flat_api.route('/v1/organization', methods=['GET'])
def organization_get():
"""Retrieve information about the MDM home organization.
Only returns a pseudo JSON-API representation because the standard has no definition for
`singleton` resources.
"""
try:
o = db.session.query(Organization).one()
except NoResultFound:
return abort(400, 'No organization details found')
org_schema = OrganizationFlatSchema()
result = org_schema.dumps(o)
return jsonify(result.data)
@flat_api.route('/v1/download/certificates/<int:certificate_id>')
def download_certificate(certificate_id: int):
"""Download a certificate in PEM format
:reqheader Accept: application/x-pem-file
:reqheader Accept: application/x-x509-user-cert
:reqheader Accept: application/x-x509-ca-cert
:resheader Content-Type: application/x-pem-file
:resheader Content-Type: application/x-x509-user-cert
:resheader Content-Type: application/x-x509-ca-cert
:statuscode 200: OK
:statuscode 404: There is no certificate configured
:statuscode 400: Can't produce requested encoding
"""
c = db.session.query(Certificate).filter(Certificate.id == certificate_id).one()
bio = io.BytesIO(c.pem_data)
return send_file(bio, 'application/x-pem-file', True, 'certificate.pem')
@flat_api.route('/v1/rsa_private_keys/<int:rsa_private_key_id>/download')
def download_key(rsa_private_key_id: int):
"""Download an RSA private key in PEM or DER format
:reqheader Accept: application/x-pem-file
:reqheader Accept: application/pkcs8
:resheader Content-Type: application/x-pem-file
:resheader Content-Type: application/pkcs8
:statuscode 200: OK
:statuscode 404: Not found
:statuscode 400: Can't produce requested encoding
"""
if not current_app.debug:
abort(500, 'Not supported in this mode')
c = db.session.query(RSAPrivateKey).filter(RSAPrivateKey.id == rsa_private_key_id).one()
bio = io.BytesIO(c.pem_data)
return send_file(bio, 'application/x-pem-file', True, 'rsa_private_key.pem')
@flat_api.route('/v1/devices/test/<int:device_id>', methods=['POST'])
def device_test(device_id: int):
"""Testing endpoint for quick and dirty command checking"""
d = db.session.query(Device).filter(Device.id == device_id).one()
#ia = commands.InstallApplication(ManifestURL='https://localhost:5443/static/appmanifest/munkitools-3.1.0.3430.plist')
ia = commands.Settings(bluetooth=False)
dbc = Command.from_model(ia)
dbc.device = d
db.session.add(dbc)
db.session.commit()
return 'OK'
@flat_api.route('/v1/devices/inventory/<int:device_id>')
def device_inventory(device_id: int):
"""Enqueue ALL inventory commands to refresh the device's entire inventory.
:statuscode 200: OK
"""
d = db.session.query(Device).filter(Device.id == device_id).one()
# DeviceInformation
di = commands.DeviceInformation.for_platform(d.platform, d.os_version)
db_command = Command.from_model(di)
db_command.device = d
db.session.add(db_command)
# InstalledApplicationList - Pretty taxing so don't run often
# ial = commands.InstalledApplicationList()
# db_command_ial = Command.from_model(ial)
# db_command_ial.device = d
# db.session.add(db_command_ial)
# CertificateList
cl = commands.CertificateList()
dbc = Command.from_model(cl)
dbc.device = d
db.session.add(dbc)
# SecurityInfo
si = commands.SecurityInfo()
dbsi = Command.from_model(si)
dbsi.device = d
db.session.add(dbsi)
# ProfileList
pl = commands.ProfileList()
db_pl = Command.from_model(pl)
db_pl.device = d
db.session.add(db_pl)
# AvailableOSUpdates
au = commands.AvailableOSUpdates()
au_pl = Command.from_model(au)
au_pl.device = d
db.session.add(au_pl)
mal = commands.ManagedApplicationList()
mal_pl = Command.from_model(mal)
mal_pl.device = d
db.session.add(mal_pl)
db.session.commit()
return 'OK'
@flat_api.route('/v1/devices/<int:device_id>/clear_passcode', methods=['POST'])
def clear_passcode(device_id: int):
"""Enqueues a ClearPasscode command for the device id specified.
:reqheader Accept: application/vnd.api+json
:reqheader Content-Type: ?
:resheader Content-Type: application/vnd.api+json
:statuscode 201: command created
:statuscode 400: not applicable to this device
:statuscode 404: device with this identifier was not found
:statuscode 500: system error
"""
d = db.session.query(Device).filter(Device.id == device_id).one()
if d.platform == Platform.macOS:
return abort(400, 'ClearPasscode is not supported on Mac computers')
if d.unlock_token is None:
return abort(400, 'No UnlockToken is available for this device')
cp = commands.ClearPasscode(UnlockToken=urlsafe_b64encode(d.unlock_token).decode('utf-8'))
cp_pl = Command.from_model(cp)
cp_pl.device = d
db.session.add(cp_pl)
db.session.commit()
return 'OK', 201, {}
@flat_api.route('/v1/devices/<int:device_id>/lock', methods=['POST'])
def lock(device_id: int):
"""Enqueues a DeviceLock command for the device id specified.
If the target device is a macOS device, a 6 digit Find My Mac PIN will be automatically generated and stored
with the device record (and also output in the response).
:reqheader Accept: application/vnd.api+json
:reqheader Content-Type: ?
:resheader Content-Type: application/vnd.api+json
:statuscode 201: command created
:statuscode 400: not applicable to this device
:statuscode 404: device with this identifier was not found
:statuscode 500: system error
"""
d = db.session.query(Device).filter(Device.id == device_id).one()
if d.platform == Platform.macOS:
return abort(400, 'Not Implemented')
dl = commands.DeviceLock()
dl_pl = Command.from_model(dl)
dl_pl.device = d
db.session.add(dl_pl)
db.session.commit()
return 'OK', 201, {}
@flat_api.route('/v1/devices/<int:device_id>/restart', methods=['POST'])
def restart(device_id: int):
"""Enqueues a RestartDevice command for the device id specified.
:reqheader Accept: application/json
:reqheader Content-Type: application/json
:resheader Content-Type: application/json
:statuscode 201: command created
:statuscode 400: not applicable to this device. returned if this device is not supervised or not capable of taking command.
:statuscode 404: device with this identifier was not found
:statuscode 500: system error
"""
d: Device = db.session.query(Device).filter(Device.id == device_id).one()
if d.model_name == 'iPhone' and not d.is_supervised:
return 'Cannot restart an unsupervised iOS device', 400, {}
cmd = commands.RestartDevice()
orm_cmd = Command.from_model(cmd)
orm_cmd.device = d
db.session.add(orm_cmd)
db.session.commit()
return 'OK'
@flat_api.route('/v1/devices/<int:device_id>/shutdown', methods=['POST'])
def shutdown(device_id: int):
"""Enqueues a Shutdown command for the device id specified.
:reqheader Accept: application/json
:reqheader Content-Type: application/json
:resheader Content-Type: application/json
:statuscode 201: command created
:statuscode 400: not applicable to this device
:statuscode 404: device with this identifier was not found
:statuscode 500: system error
"""
d = db.session.query(Device).filter(Device.id == device_id).one()
if d.model_name == 'iPhone' and not d.is_supervised:
return 'Cannot shut down an unsupervised iOS device', 400, {}
cmd = commands.ShutDownDevice()
orm_cmd = Command.from_model(cmd)
orm_cmd.device = d
db.session.add(orm_cmd)
db.session.commit()
return 'OK'
@flat_api.route('/v1/upload/profiles', methods=['POST'])
def upload_profile():
"""Upload a custom profile using multipart/form-data I.E from an upload input.
Encrypted profiles are not supported.
The profiles contents will be stored using the following process:
- For the top level profile (and each payload) there is a marshmallow schema which maps the payload keys into
the SQLAlchemy model keys. It is also the responsibility of the marshmallow schema to be the validator for
uploaded profiles.
- The profile itself is inserted as a Profile model.
- Each payload is unmarshalled using marshmallow to a specific Payload model. Each specific model contains a join
table inheritance to the base ``payloads`` table.
The returned body contains a jsonapi object with details of the newly created profile and associated payload ID's.
Note: Does not support ``application/x-www-form-urlencoded``
TODO:
- Support signed profiles
:reqheader Accept: application/vnd.api+json
:reqheader Content-Type: multipart/form-data
:resheader Content-Type: application/vnd.api+json
:statuscode 201: profile created
:statuscode 400: If the request contained malformed or missing payload data.
:statuscode 500: If something else went wrong with parsing or persisting the payload(s)
"""
if 'file' not in request.files:
abort(400, 'no file uploaded in request data')
f = request.files['file']
if not f.content_type == 'application/x-apple-aspen-config':
abort(400, 'incorrect MIME type in request')
try:
data = f.read()
plist = plistlib.loads(data)
profile = ProfilePlistSchema().load(plist).data
except plistlib.InvalidFileException as e:
current_app.logger.error(e)
abort(400, 'invalid plist format supplied')
except BaseException as e: # TODO: separate errors for exceptions caught here
current_app.logger.error(e)
abort(400, 'cannot parse the supplied profile')
profile.data = data
db.session.add(profile)
db.session.commit()
profile_schema = ProfileSchema()
model_data = profile_schema.dump(profile).data
resp = make_response(jsonify(model_data), 201, {'Content-Type': 'application/vnd.api+json'})
return resp
@flat_api.route('/v1/download/profiles/<int:profile_id>')
def download_profile(profile_id: int):
"""Download a profile.
The profile is reconstructed from its database representation.
Args:
profile_id (int): The profile id
:reqheader Accept: application/x-apple-aspen-config
:resheader Content-Type: application/x-apple-aspen-config
:statuscode 200:
:statuscode 404:
:statuscode 500:
"""
try:
profile = db.session.query(Profile).filter(Profile.id == profile_id).one()
except NoResultFound:
abort(404)
return profile.data, 200, {'Content-Type': 'application/x-apple-aspen-config'}
================================================
FILE: commandment/api/app_jsonapi.py
================================================
"""
This module contains all of the API generated using the Flask-REST-JSONAPI extension.
"""
from flask import Blueprint
from flask_rest_jsonapi import Api
from .resources import CertificatesList, CertificateDetail, CertificateSigningRequestList, \
CertificateSigningRequestDetail, PushCertificateList, SSLCertificatesList, \
CACertificateList, PrivateKeyDetail, DeviceList, DeviceDetail, \
DeviceRelationship, \
TagsList, TagDetail, TagRelationship
# PayloadsList, PayloadDetail,
api_app = Blueprint('api_app', __name__)
api = Api(blueprint=api_app)
# Certificates
api.route(CertificatesList, 'certificates_list', '/v1/certificates/')
api.route(CertificateDetail, 'certificate_detail', '/v1/certificates/<int:certificate_id>')
api.route(CertificateSigningRequestList, 'certificate_signing_request_list', '/v1/certificate_signing_requests')
api.route(CertificateSigningRequestDetail, 'certificate_signing_request_detail',
'/v1/certificate_signing_requests/<int:certificate_signing_request_id>')
api.route(PushCertificateList, 'push_certificates_list', '/v1/push_certificates/')
api.route(SSLCertificatesList, 'ssl_certificates_list', '/v1/ssl_certificates/')
api.route(CACertificateList, 'ca_certificates_list', '/v1/ca_certificates/')
api.route(PrivateKeyDetail, 'private_key_detail', '/v1/rsa_private_keys/<int:private_key_id>')
# Devices
api.route(DeviceList, 'devices_list', '/v1/devices', '/v1/device_groups/<int:device_group_id>/devices',
'/v1/dep/profiles/<int:dep_profile_id>/devices',
'/v1/managed_applications/<int:managed_application_id>/devices')
api.route(DeviceDetail, 'device_detail', '/v1/devices/<int:device_id>')
api.route(DeviceRelationship, 'device_commands', '/v1/devices/<int:device_id>/relationships/commands')
api.route(DeviceRelationship, 'device_tags', '/v1/devices/<int:device_id>/relationships/tags')
api.route(DeviceRelationship, 'device_dep_profile', '/v1/devices/<int:device_id>/relationships/dep_profile')
# Organizations
# api.route(OrganizationList, 'organizations_list', '/v1/organizations')
# api.route(OrganizationDetail, 'organization_detail', '/v1/organizations/<int:organization_id>')
# Tags
api.route(TagsList, 'tags_list', '/v1/tags', '/v1/devices/<int:device_id>/tags')
api.route(TagDetail, 'tag_detail', '/v1/tags/<int:tag_id>')
api.route(TagRelationship, 'tag_devices', '/v1/tags/<int:tag_id>/relationships/devices')
================================================
FILE: commandment/api/configuration.py
================================================
"""
This module contains a Blueprint for API endpoints relating to system configuration.
"""
from flask import Blueprint, abort, jsonify, request
from sqlalchemy.orm.exc import NoResultFound
from commandment.models import db, Organization, SCEPConfig
from .schema import OrganizationFlatSchema, SCEPConfigFlatSchema
from commandment.profiles.schema import ProfileSchema
configuration_app = Blueprint('configuration_app', __name__)
@configuration_app.route('/organization', methods=['GET'])
def organization_get():
"""Retrieve information about the MDM home organization.
:reqheader Accept: application/json
:reqheader Content-Type: application/json
:resheader Content-Type: application/json
:statuscode 200: Success
:statuscode 404: No configuration available
:statuscode 500: Other error
"""
try:
o = db.session.query(Organization).one()
except NoResultFound:
return abort(404, 'No organization details found')
schema = OrganizationFlatSchema()
dump = schema.dumps(o)
return dump.data, 200, {'Content-Type': 'application/json'}
@configuration_app.route('/organization', methods=['PATCH', 'POST'])
def organization_post():
"""Update information about the MDM home organization.
:reqheader Accept: application/json
:reqheader Content-Type: application/json
:resheader Content-Type: application/json
:statuscode 201: Success
:statuscode 400: Validation Error
:statuscode 500: Other error
"""
schema = OrganizationFlatSchema()
data = request.data
result = schema.loads(data)
db.session.commit()
dump = schema.dumps(result.data)
return dump.data, 200, {'Content-Type': 'application/json'}
@configuration_app.route('/scep', methods=['GET'])
def scep_get():
"""Retrieve information about SCEP enrollment configuration
:reqheader Accept: application/json
:reqheader Content-Type: application/json
:resheader Content-Type: application/json
:statuscode 200: Success
:statuscode 404: No configuration available
:statuscode 500: Other error
"""
try:
c = db.session.query(SCEPConfig).one()
except NoResultFound:
return abort(404, 'No organization details found')
schema = SCEPConfigFlatSchema()
dump = schema.dumps(c)
return dump.data, 200, {'Content-Type': 'application/json'}
@configuration_app.route('/scep', methods=['PATCH', 'POST'])
def scep_post():
"""Update information about SCEP enrollment configuration
:reqheader Accept: application/json
:reqheader Content-Type: application/json
:resheader Content-Type: application/json
:statuscode 201: Success
:statuscode 400: Validation Error
:statuscode 500: Other error
"""
schema = SCEPConfigFlatSchema()
data = request.data
result = schema.loads(data)
db.session.commit()
dump = schema.dumps(result.data)
return dump.data, 200, {'Content-Type': 'application/json'}
================================================
FILE: commandment/api/resources.py
================================================
"""
This module defines resources, as required by the Flask-REST-JSONAPI package. This represents most of the REST API.
"""
from flask_rest_jsonapi.exceptions import ObjectNotFound
from sqlalchemy.orm.exc import NoResultFound
from .schema import DeviceSchema, CertificateSchema, PrivateKeySchema, \
CertificateSigningRequestSchema, OrganizationSchema, TagSchema
from commandment.models import db, Device, Organization, Tag, Command
from commandment.pki.models import Certificate, CertificateSigningRequest, SSLCertificate, PushCertificate, \
CACertificate
from commandment.mdm import commands as mdmcommands, CommandType
from commandment.auth import oauth2
from flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship
class DeviceList(ResourceList):
# decorators = (oauth2.require_oauth(''),)
schema = DeviceSchema
data_layer = {'session': db.session, 'model': Device}
class DeviceDetail(ResourceDetail):
schema = DeviceSchema
data_layer = {
'session': db.session,
'model': Device,
'url_field': 'device_id'
}
def before_patch(self, args, kwargs, data=None):
"""Custom logic when updating a device:
- If the `device_name` field would change, we queue a new Settings command to change the name of the device.
- If there already was an undelivered Settings command, it should be replaced by the new one.
- If the `hostname` field would change, that should also be sent via a Settings command (will be coalesced with Device Name).
"""
if 'device_name' in data or 'hostname' in data:
# settings_commands = self.data_layer['model'].commands
cmd: mdmcommands.Settings = mdmcommands.Command.new_request_type("Settings", {})
if 'device_name' in data:
cmd.device_name = data['device_name']
del data['device_name']
if 'hostname' in data:
cmd.hostname = data['hostname']
del data['hostname']
model = Command.from_model(cmd)
self.data_layer['session'].add(model)
class DeviceRelationship(ResourceRelationship):
schema = DeviceSchema
data_layer = {
'session': db.session,
'model': Device,
'url_field': 'device_id'
}
def before_post(self, args, kwargs, json_data=None):
"""Custom logic for relationship management:
- If the dep_profile relationship is created, we need to check if the DEP Profile exists or has been uploaded yet.
"""
pass
def before_patch(self, args, kwargs, json_data=None):
pass
def after_patch(self, result):
"""Device relationship post-processing:
- If `dep_profiles` relationship was changed, update the DEP profile on the apple side.
"""
pass
# dep = get_dep()
class CertificatesList(ResourceList):
schema = CertificateSchema
data_layer = {'session': db.session, 'model': Certificate}
class CertificateDetail(ResourceDetail):
schema = CertificateSchema
data_layer = {'session': db.session, 'model': Certificate}
class CertificateTypeDetail(ResourceDetail):
schema = CertificateSchema
data_layer = {'session': db.session, 'model': Certificate}
class PrivateKeyDetail(ResourceDetail):
schema = PrivateKeySchema
data_layer = {'session': db.session, 'model': Certificate}
class CertificateSigningRequestList(ResourceList):
schema = CertificateSigningRequestSchema
data_layer = {
'session': db.session,
'model': CertificateSigningRequest,
}
class CertificateSigningRequestDetail(ResourceDetail):
schema = CertificateSigningRequestSchema
data_layer = {
'session': db.session,
'model': CertificateSigningRequest
}
class PushCertificateList(ResourceList):
schema = CertificateSchema
data_layer = {
'session': db.session,
'model': PushCertificate
}
class CACertificateList(ResourceList):
schema = CertificateSchema
data_layer = {
'session': db.session,
'model': CACertificate
}
class SSLCertificatesList(ResourceList):
schema = CertificateSchema
data_layer = {
'session': db.session,
'model': SSLCertificate
}
class OrganizationList(ResourceList):
schema = OrganizationSchema
data_layer = {
'session': db.session,
'model': Organization
}
class OrganizationDetail(ResourceDetail):
schema = OrganizationSchema
data_layer = {
'session': db.session,
'model': Organization
}
class TagsList(ResourceList):
schema = TagSchema
data_layer = {
'session': db.session,
'model': Tag
}
view_kwargs = True
class TagDetail(ResourceDetail):
schema = TagSchema
data_layer = {
'session': db.session,
'model': Tag,
'url_field': 'tag_id'
}
class TagRelationship(ResourceRelationship):
schema = TagSchema
data_layer = {
'session': db.session,
'model': Tag,
'url_field': 'tag_id'
}
================================================
FILE: commandment/api/schema.py
================================================
"""
This module contains schema definitions for Marshmallow-JSONAPI and therefore Flask-REST-JSONAPI.
It also contains non subpackage specific JSON schema definitions.
"""
from marshmallow_jsonapi import fields
from marshmallow_jsonapi.flask import Relationship, Schema
from marshmallow import Schema as FlatSchema, post_load
from commandment.models import db, Organization, SCEPConfig
class DeviceSchema(Schema):
class Meta:
type_ = 'devices'
self_view = 'api_app.device_detail'
self_view_kwargs = {'device_id': '<id>'}
self_view_many = 'api_app.devices_list'
strict = True
id = fields.Int(dump_only=True)
udid = fields.Str(dump_only=True)
topic = fields.Str()
build_version = fields.Str()
# device_name and hostname are "pseudo" read-only in that writing them does not affect the field but enqueues
# an MDM command to change the name.
device_name = fields.Str()
hostname = fields.Str()
local_hostname = fields.Str(dump_only=True)
model = fields.Str()
model_name = fields.Str()
os_version = fields.Str()
product_name = fields.Str()
serial_number = fields.Str()
awaiting_configuration = fields.Bool()
last_seen = fields.DateTime(dump_only=True)
available_device_capacity = fields.Float()
device_capacity = fields.Float()
wifi_mac = fields.Str()
bluetooth_mac = fields.Str()
# private
# push_magic = fields.Str()
# token = fields.Str()
# unlock_token = fields.Str()
tokenupdate_at = fields.DateTime()
# SecurityInfo
passcode_present = fields.Bool()
passcode_compliant = fields.Bool()
passcode_compliant_with_profiles = fields.Bool()
fde_enabled = fields.Bool()
fde_has_prk = fields.Bool()
fde_has_irk = fields.Bool()
firewall_enabled = fields.Bool()
block_all_incoming = fields.Bool()
stealth_mode_enabled = fields.Bool()
sip_enabled = fields.Bool()
battery_level = fields.Float(dump_only=True)
imei = fields.Str(dump_only=True)
is_cloud_backup_enabled = fields.Bool(dump_only=True)
itunes_store_account_is_active = fields.Bool(dump_only=True)
last_cloud_backup_date = fields.DateTime(dump_only=True)
# TODO: Relationship to dep_config
# certificate = Relationship(
# self_view='api_app.device_certificate',
# self_view_kwargs={'certificate_id': '<id>'},
# related_view='api_app.certificate_detail',
# related_view_kwargs={'certificate_id': '<id>'},
# )
# DEP
is_dep = fields.Bool()
description = fields.Str(dump_only=True)
color = fields.Str(dump_only=True)
asset_tag = fields.Str(dump_only=True)
profile_status = fields.Str(dump_only=True)
profile_uuid = fields.UUID(dump_only=True)
profile_assign_time = fields.DateTime(dump_only=True)
profile_push_time = fields.DateTime(dump_only=True)
device_assigned_date = fields.DateTime(dump_only=True)
device_assigned_by = fields.Str(dump_only=True)
os = fields.Str(dump_only=True)
device_family = fields.Str(dump_only=True)
commands = Relationship(
related_view='api_app.commands_list',
related_view_kwargs={'device_id': '<id>'},
many=True,
schema='CommandSchema',
type_='commands'
)
installed_certificates = Relationship(
related_view='api_app.installed_certificates_list',
related_view_kwargs={'device_id': '<id>'},
many=True,
schema='InstalledCertificateSchema',
type_='installed_certificates'
)
installed_applications = Relationship(
related_view='api_app.installed_applications_list',
related_view_kwargs={'device_id': '<id>'},
many=True,
schema='InstalledApplicationSchema',
type_='installed_applications'
)
tags = Relationship(
related_view='api_app.tags_list',
related_view_kwargs={'device_id': '<id>'},
many=True,
schema='TagSchema',
type_='tags'
)
available_os_updates = Relationship(
related_view='api_app.available_os_updates_list',
related_view_kwargs={'device_id': '<id>'},
many=True,
schema='AvailableOSUpdateSchema',
type_='available_os_updates'
)
dep_profile = Relationship(
related_view='dep_app.dep_profile_detail',
related_view_kwargs={'dep_profile_id': '<dep_profile_id>'},
many=False,
schema='DEPProfileSchema',
type_='dep_profiles',
)
class PrivateKeySchema(Schema):
class Meta:
type_ = 'private_keys'
self_view = 'api_app.private_key_detail'
self_view_kwargs = {'private_key_id': '<id>'}
strict = True
id = fields.Int(dump_only=True)
pem_key = fields.Str()
class CertificateSchema(Schema):
class Meta:
type_ = 'certificates'
self_view = 'api_app.certificate_detail'
self_view_kwargs = {'certificate_id': '<id>'}
self_view_many = 'api_app.certificates_list'
strict = True
id = fields.Int(dump_only=True)
type = fields.Str(attribute='type')
x509_cn = fields.Str(dump_only=True)
not_before = fields.DateTime(dump_only=True)
not_after = fields.DateTime(dump_only=True)
# fingerprint = fields.Str(dump_only=True)
pem_certificate = fields.Str()
private_key = Relationship(
self_view='api_app.certificate_private_keys',
self_view_kwargs={'id': '<id>'},
related_view='api_app.private_key_detail',
related_view_kwargs={'private_key_id': '<id>'},
many=False,
schema='PrivateKeySchema',
type_='private_keys'
)
class CertificateSigningRequestSchema(Schema):
class Meta:
type_ = 'certificate_signing_requests'
self_view = 'api_app.certificate_signing_request_detail'
self_view_kwargs = {'certificate_signing_request_id': '<id>'}
self_view_many = 'api_app.certificate_signing_request_list'
id = fields.Int(dump_only=True)
purpose = fields.Str(load_only=True, attribute='req_type')
subject = fields.Str()
pem_request = fields.Str()
class OrganizationSchema(Schema):
class Meta:
type_ = 'organizations'
self_view = 'api_app.organization_detail'
self_view_kwargs = {'organization_id': '<id>'}
id = fields.Int(dump_only=True)
name = fields.Str()
payload_prefix = fields.Str()
x509_ou = fields.Str()
x509_o = fields.Str()
x509_st = fields.Str()
x509_c = fields.Str()
class OrganizationFlatSchema(FlatSchema):
name = fields.Str(required=True)
payload_prefix = fields.Str(required=True)
x509_ou = fields.Str()
x509_o = fields.Str()
x509_st = fields.Str()
x509_c = fields.Str()
@post_load
def make_organization(self, data: dict) -> Organization:
"""Construct a model from a parsed JSON schema."""
rows = db.session.query(Organization).count()
if rows == 1:
db.session.query(Organization).update(data)
o = db.session.query(Organization).first()
else:
o = Organization(**data)
db.session.add(o)
return o
class SCEPConfigFlatSchema(FlatSchema):
source_type = fields.String()
url = fields.Url(relative=False, schemes=['http', 'https'], required=True)
challenge_enabled = fields.Boolean()
ca_fingerprint = fields.String()
subject = fields.String()
key_size = fields.Integer()
key_type = fields.String(dump_only=True)
key_usage = fields.Integer()
subject_alt_name = fields.String()
retries = fields.Integer()
retry_delay = fields.Integer()
certificate_renewal_time_interval = fields.Integer()
@post_load
def make_scepconfig(self, data: dict) -> SCEPConfig:
"""Construct a model from a parsed JSON schema."""
rows = db.session.query(SCEPConfig).count()
if rows == 1:
db.session.query(SCEPConfig).update(data)
o = db.session.query(SCEPConfig).first()
else:
o = SCEPConfig(**data)
db.session.add(o)
return o
class TagSchema(Schema):
class Meta:
type_ = 'tags'
self_view = 'api_app.tag_detail'
self_view_kwargs = {'tag_id': '<id>'}
self_view_many = 'api_app.tags_list'
id = fields.Int(dump_only=True)
name = fields.Str()
color = fields.Str()
devices = Relationship(
self_view='api_app.tag_devices',
self_view_kwargs={'tag_id': '<id>'},
related_view='api_app.device_detail',
related_view_kwargs={'device_id': '<id>'},
schema='DeviceSchema',
many=True,
type_='devices'
)
# profiles = Relationship(
# related_view='api_app.profiles_list',
# related_view_kwargs={'profile_id': '<id>'},
# schema='ProfileSchema',
# many=True,
# type_='profiles'
# )
================================================
FILE: commandment/apns/__init__.py
================================================
================================================
FILE: commandment/apns/app.py
================================================
from datetime import datetime
from flask import Blueprint, request, abort, current_app, jsonify
from sqlalchemy.orm.exc import NoResultFound
from commandment.errors import JSONAPIError
from commandment.models import db, Device
from commandment.pki.models import RSAPrivateKey, CertificateSigningRequest, CACertificate, \
EncryptionCertificate
from commandment.pki import ssl as cmdssl
from .push import push_to_device
from .schema import PushResponseFlatSchema
from .mdmcert import submit_mdmcert_request, decrypt_mdmcert
import ssl
api_push_app = Blueprint('api_push_app', __name__)
MDMCERT_REQ_URL = 'https://mdmcert.download/api/v1/signrequest'
# PLEASE! Do not take this key and use it for another product/project. It's
# only for Commandment's use. If you'd like to get your own (free!) key
# contact the mdmcert.download administrators and get your own key for your
# own project/product. We're trying to keep statistics on which products are
# requesting certs (per Apple T&C). Don't force Apple's hand and
# ruin it for everyone!
MDMCERT_API_KEY = 'b742461ff981756ca3f924f02db5a12e1f6639a9109db047ead1814aafc058dd'
@api_push_app.route('/v1/devices/<int:device_id>/push', methods=['POST', 'GET'])
def push(device_id: int):
"""Send a (Blank) push notification to the specified device by its Commandment ID.
This causes the device to check back with the MDM for pending commands.
:statuscode 400: impossible to push to device (no token or invalid token)
:statuscode 404: device does not exist
:statuscode 200: push complete
"""
device = db.session.query(Device).filter(Device.id == device_id).one()
if device.token is None or device.push_magic is None:
abort(jsonify(error=True, message='Cannot request push on a device that has no device token or push magic'))
try:
response = push_to_device(device)
except ssl.SSLError:
return abort(400, jsonify(error=True, message="The push certificate has expired"))
current_app.logger.info("[APNS2 Response] Status: %d, Reason: %s, APNS ID: %s, Timestamp",
response.status_code, response.reason, response.apns_id.decode('utf-8'))
device.last_push_at = datetime.utcnow()
if response.status_code == 200:
device.last_apns_id = response.apns_id
db.session.commit()
push_res_schema = PushResponseFlatSchema()
result = push_res_schema.dumps(response)
return result
@api_push_app.route('/v1/mdmcert/request/<string:email>', methods=['GET'])
def mdmcert_request(email: str):
"""Ask the mdmcert.download service to generate a new Certificate Signing Request for the given e-mail address.
If an encryption certificate does not exist on the system, one will be generated to process the resulting encrypted
and signed CSR. The common name of the certificate will be the e-mail address that is registered with the
mdmcert.download service, and the type will be an EncryptionCertificate.
:reqheader Accept: application/json
:resheader Content-Type: application/json
"""
try:
apns_csr_model = db.session.query(CertificateSigningRequest).\
filter(CertificateSigningRequest.x509_cn == "commandment-apns").one()
except NoResultFound:
private_key, csr = cmdssl.generate_signing_request('commandment-apns')
private_key_model = RSAPrivateKey.from_crypto(private_key)
db.session.add(private_key_model)
apns_csr_model = CertificateSigningRequest.from_crypto(csr)
apns_csr_model.rsa_private_key = private_key_model
db.session.add(apns_csr_model)
db.session.commit()
try:
encrypt_cert_model = db.session.query(EncryptionCertificate).\
filter(EncryptionCertificate.x509_cn == email).one()
except NoResultFound:
encrypt_key, encrypt_with_cert = cmdssl.generate_self_signed_certificate(email)
encrypt_key_model = RSAPrivateKey.from_crypto(encrypt_key)
db.session.add(encrypt_key_model)
encrypt_cert_model = EncryptionCertificate.from_crypto(encrypt_with_cert)
encrypt_cert_model.rsa_private_key = encrypt_key_model
db.session.add(encrypt_cert_model)
db.session.commit()
current_app.logger.info("Submitting request to mdmcert.download for %s", email)
mdmcert_result = submit_mdmcert_request(
email=email,
csr_pem=apns_csr_model.pem_data,
encrypt_with_pem=encrypt_cert_model.pem_data,
)
return jsonify(mdmcert_result)
@api_push_app.route('/v1/mdmcert/decrypt', methods=['POST'])
def mdmcert_decrypt():
"""Upload the encrypted, signed request from mdmcert.download that was received via e-mail.
The filename looks something like :file:`mdm_signed_request.YYMMDD_HHMMSS_NNN.plist.b64.p7`
It is a hex-encoded PKCS#7 message.
:reqheader Accept: application/json
:reqheader Content-Type: multipart/form-data
:statuscode 200: successfully decrypted request
:statuscode 415: invalid or no certificate supplied
:statuscode 501: impossible to serve the request because we don't have the matching key
"""
if 'file' not in request.files:
return abort(415, 'no file uploaded in request data')
encrypted_payload = request.files['file'].stream.read()
try:
# TODO: Identify the specific certificate used to generate the request
encrypt_cert: EncryptionCertificate = db.session.query(EncryptionCertificate).first()
except NoResultFound:
return abort(500, 'unable to decrypt, there was no decryption cert')
pk = encrypt_cert.rsa_private_key.to_crypto()
try:
result = decrypt_mdmcert(encrypted_payload, pk)
except ValueError as e:
raise JSONAPIError(
title="Unable to decrypt signed request",
status=415,
detail="Could not find a suitable private key to decrypt the given request",
)
return result, 200, {
'Content-Type': 'application/octet-stream',
'Content-Disposition': 'attachment; filename=mdm_signed_request.%s.plist.b64' % datetime.now().strftime('%Y%m%d_%H%M%S'),
}
================================================
FILE: commandment/apns/mdmcert.py
================================================
"""
Copyright (c) 2015 Jesse Peterson, 2017 Mosen
Licensed under the MIT license. See the included LICENSE.txt file for details.
"""
from typing import Dict
from flask import Response
import json
from base64 import b64encode
import requests
from binascii import unhexlify
from cryptography import x509
from cryptography.hazmat.primitives import serialization, padding
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKeyWithSerialization
from commandment.dep.smime import decrypt, decrypt_smime_content
MDMCERT_REQ_URL = 'https://mdmcert.download/api/v1/signrequest'
# PLEASE! Do not take this key and use it for another product/project. It's
# only for Commandment's use. If you'd like to get your own (free!) key
# contact the mdmcert.download administrators and get your own key for your
# own project/product. We're trying to keep statistics on which products are
# requesting certs (per Apple T&C). Don't force Apple's hand and
# ruin it for everyone!
MDMCERT_API_KEY = 'b742461ff981756ca3f924f02db5a12e1f6639a9109db047ead1814aafc058dd'
CERT_REQ_TYPE = 'mdmcert.pushcert'
def submit_mdmcert_request(email: str, csr_pem: str,
encrypt_with_pem: str, api_key: str = MDMCERT_API_KEY) -> Dict:
"""Submit a CSR signing request to mdmcert.download.
Note: Need to ``export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES`` on High Sierra +
Example Response:
{'reason': 'Invalid email address. Have you registered yet at https://mdmcert.download/?', 'result': 'failure'}
on success:
{'result': 'success'}
Args:
email (str): Your registered mdmcert.download e-mail address.
api_key (str): Your registered mdmcert.download API key.
csr_pem (str): The MDM CSR to sign.
encrypt_with_pem (str): The certificate which will be used to encrypt the response.
Returns:
dict: Response from the mdmcert.download service.
"""
base64_csr = b64encode(csr_pem)
base64_recipient = b64encode(encrypt_with_pem)
mdmcert_dict = {
'csr': base64_csr.decode('utf8'),
'email': email,
'key': api_key,
'encrypt': base64_recipient.decode('utf8'),
}
session = requests.Session()
# This was necessary because i had Charles proxy on macOS which caused the subprocess to abort trap 6. The reason
# is interlinked with request's ability to read system proxy settings.
session.trust_env = False # Don't read proxy settings from OS.
res = session.post(
MDMCERT_REQ_URL,
data=json.dumps(mdmcert_dict).encode('utf8'),
headers={
'Content-Type': 'application/json',
'User-Agent': 'coMmanDMent/0.1',
})
return res.json()
class FixedLocationResponse(Response):
# override Werkzeug default behaviour of "fixing up" once-non-compliant
# relative location headers. now permitted in rfc7231 sect. 7.1.2
autocorrect_location_header = False
def decrypt_mdmcert(response: bytes, decrypt_with: RSAPrivateKeyWithSerialization) -> bytes:
"""Decrypt a .plist.b64.p7 supplied by mdmcert.download.
In order to decrypt this we need to:
- decode the payload using unhexlify()
- find the private key that corresponded to the request.
Args:
response (bytes): The still encryped and hex encoded payload
decrypt_with (RSAPrivateKeyWithSerialization): The private key that should be used to decrypt the payload.
Returns:
bytes - the decrypted response
"""
decoded_payload = unhexlify(response)
# try:
result = decrypt_smime_content(decoded_payload, decrypt_with)
# except ValueError as e:
# return abort(400, e)
# result = decrypt_with.decrypt(
# decoded_payload,
# padding.PKCS7(block_size=8)
# )
return result
================================================
FILE: commandment/apns/push.py
================================================
"""
Copyright (c) 2015 Jesse Peterson
Licensed under the MIT license. See the included LICENSE.txt file for details.
Attributes:
apns_cxns (dict): A dictionary containing APNS connections keyed by the push certificate topic.
"""
import os
import apns2
from cryptography import x509
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.backends import default_backend
from oscrypto.keys import parse_pkcs12
from flask import g, current_app
from commandment.models import Device
import json
def get_apns() -> apns2.APNSClient:
apns = getattr(g, '_apns', None)
if apns is None:
push_certificate_path = current_app.config['PUSH_CERTIFICATE']
if not os.path.exists(push_certificate_path):
raise RuntimeError('You specified a push certificate at: {}, but it does not exist.'.format(push_certificate_path))
client_cert = push_certificate_path # can be a single path or tuple of 2
# We can handle loading PKCS#12 but APNS2Client specifically requests PEM encoded certificates
push_certificate_basename, ext = os.path.splitext(push_certificate_path)
if ext.lower() == '.p12':
pem_key_path = push_certificate_basename + '.key'
pem_certificate_path = push_certificate_basename + '.crt'
if not os.path.exists(pem_key_path) or not os.path.exists(pem_certificate_path):
current_app.logger.info('You provided a PKCS#12 push certificate, we will have to encode it as PEM to continue...')
current_app.logger.info('.key and .crt files will be saved in the same location')
with open(push_certificate_path, 'rb') as fd:
if 'PUSH_CERTIFICATE_PASSWORD' in current_app.config:
key, certificate, intermediates = parse_pkcs12(fd.read(), bytes(current_app.config['PUSH_CERTIFICATE_PASSWORD'], 'utf8'))
else:
key, certificate, intermediates = parse_pkcs12(fd.read())
crypto_key = serialization.load_der_private_key(key.dump(), None, default_backend())
with open(pem_key_path, 'wb') as fd:
fd.write(crypto_key.private_bytes(
encoding=serialization.Encoding.PEM,
format=serialization.PrivateFormat.PKCS8,
encryption_algorithm=serialization.NoEncryption()))
crypto_cert = x509.load_der_x509_certificate(certificate.dump(), default_backend())
with open(pem_certificate_path, 'wb') as fd:
fd.write(crypto_cert.public_bytes(serialization.Encoding.PEM))
client_cert = pem_certificate_path, pem_key_path
try:
apns = g._apns = apns2.APNSClient(mode='prod', client_cert=client_cert)
except:
raise RuntimeError('Your push certificate is expired or invalid')
return apns
class MDMPayload(apns2.Payload):
"""A class representing an MDM APNs message payload."""
def __init__(self, push_magic: str) -> None:
"""Constructor
Args:
push_magic (str): The push magic token that was supplied by an enrolled device.
"""
super(MDMPayload, self).__init__(custom={'mdm': push_magic})
self._push_magic = push_magic
def to_json(self) -> str:
return json.dumps({'mdm': self._push_magic})
def push_to_device(device: Device) -> apns2.Response:
"""Issue a `Blank Push` to a device.
If the push token is invalid then it will be automatically set to None
Args:
device (Device): The device model to push to, must have a valid apns token and push magic
Raises:
ssl.SSLError [SSL: SSLV3_ALERT_CERTIFICATE_EXPIRED] sslv3 alert certificate expired (_ssl.c:777) if the push
certificate has expired and the system attempts a push.
Returns:
APNS2Client Response object
"""
current_app.logger.debug('Sending a push notification to {} on topic {}, using push magic: {}'.format(
device.hex_token, device.topic, device.push_magic
))
client = get_apns()
payload = MDMPayload(device.push_magic)
notification = apns2.Notification(payload, priority=apns2.PRIORITY_LOW)
response: apns2.response.Response = client.push(notification, device.hex_token, device.topic)
# 410 means that the token is no longer valid for this device, so don't attempt to push any more
if response.status_code == 410:
device.token = None
device.push_magic = None
return response
================================================
FILE: commandment/apns/schema.py
================================================
from marshmallow import Schema, fields
class PushResponseFlatSchema(Schema):
"""This structure mimics the fields of an APNS2 service reply."""
apns_id = fields.Integer()
status_code = fields.Integer()
reason = fields.Str()
timestamp = fields.DateTime()
================================================
FILE: commandment/apns/threads.py
================================================
from typing import Tuple
import logging
import threading
from datetime import datetime
import dateutil.parser
from flask import Flask
import ssl
from commandment.mdm import CommandStatus
from commandment.models import db, Device, Command
from commandment.apns.push import push_to_device
import sqlalchemy.orm.exc
from sqlalchemy import func
push_thread = None
push_start = 2
push_time = 90
push_thread_stopped = threading.Event()
logger = logging.getLogger('push thread')
def start(app: Flask):
"""Start the APNS Pusher thread"""
logger.info('PUSH thread will start in %d second(s). polling at intervals of %d second(s).', push_start, push_time)
push_thread = threading.Timer(push_start, push_thread_callback, [app])
push_thread.daemon = True
push_thread.start()
def stop():
"""Stop the APNS Pusher thread"""
logger.info('PUSH thread will stop')
push_thread_stopped.set()
global push_thread
if push_thread is threading.Timer:
push_thread.cancel()
def push_thread_callback(app: Flask):
"""Process outstanding MDM commands by issuing a push to device(s).
TODO: A push with no response needs an exponential backoff time.
Commands that are ready to send must satisfy these criteria:
- Command is in Queued state.
- Command.after is null.
- Command.ttl is not zero.
- Device is enrolled (is_enrolled)
"""
while not push_thread_stopped.wait(push_time):
app.logger.info('Push Thread checking for outstanding commands...')
with app.app_context():
pending: Tuple[Device, int] = db.session.query(Device, func.Count(Command.id)).\
filter(Device.id == Command.device_id).\
filter(Command.status == CommandStatus.Queued).\
filter(Command.ttl > 0).\
filter(Command.after == None).\
filter(Device.is_enrolled == True).\
group_by(Device.id).\
all()
for d, c in pending:
app.logger.info('PENDING: %d command(s) for device UDID %s', c, d.udid)
if d.token is None or d.push_magic is None:
app.logger.warn('Cannot request push on a device that has no device token or push magic')
continue
try:
response = push_to_device(d)
except ssl.SSLError:
return stop()
app.logger.info("[APNS2 Response] Status: %d, Reason: %s, APNS ID: %s, Timestamp",
response.status_code, response.reason, response.apns_id.decode('utf-8'))
d.last_push_at = datetime.utcnow()
if response.status_code == 200:
d.last_apns_id = response.apns_id
db.session.commit()
================================================
FILE: commandment/app.py
================================================
from commandment import create_app
app = create_app(None)
================================================
FILE: commandment/apps/__init__.py
================================================
from enum import Enum
class ManagedAppStatus(Enum):
"""A list of possible Managed Application statuses returned by the `ManagedApplicationList` command."""
NeedsRedemption = 'NeedsRedemption'
Redeeming = 'Redeeming'
Prompting = 'Prompting'
PromptingForLogin = 'PromptingForLogin'
Installing = 'Installing'
ValidatingPurchase = 'ValidatingPurchase'
Managed = 'Managed'
ManagedButUninstalled = 'ManagedButUninstalled'
PromptingForUpdate = 'PromptingForUpdate'
PromptingForUpdateLogin = 'PromptingForUpdateLogi
gitextract_jp6y57tz/
├── .circleci/
│ └── config.yml
├── .docker/
│ ├── Dockerfile
│ ├── entry.sh
│ ├── nginx.conf
│ ├── openssl.cnf
│ ├── settings.cfg.docker
│ ├── supervisord.conf
│ ├── uwsgi-commandment.ini
│ └── uwsgi.ini
├── .dockerignore
├── .gitignore
├── .gitlab-ci.yml
├── LICENSE.txt
├── Pipfile
├── README.rst
├── alembic.ini
├── assets/
│ └── logo.afdesign
├── commandment/
│ ├── __init__.py
│ ├── ac2/
│ │ ├── __init__.py
│ │ └── ac2_app.py
│ ├── alembic/
│ │ ├── __init__.py
│ │ ├── disabled_versions/
│ │ │ ├── 072fba4a2256_create_ad_payload_table.py
│ │ │ ├── 18412434fb57_create_energy_saver_payload_table.py
│ │ │ ├── 323a90039a6a_create_email_payload_table.py
│ │ │ ├── 4eddbcb30464_create_mdm_payload_table.py
│ │ │ ├── 8186b8ecf0fc_create_ad_cert_payload_table.py
│ │ │ ├── 9dd4e48235e3_create_vpn_payload_table.py
│ │ │ ├── d65049bf4b91_create_wifi_payload_table.py
│ │ │ ├── da52b64b865f_create_apps_table.py
│ │ │ ├── e47e29a9537c_create_certificate_payload_table.py
│ │ │ └── fc0c134cbb2e_create_password_policy_payload_table.py
│ │ ├── env.py
│ │ ├── script.py.mako
│ │ └── versions/
│ │ ├── 0201b96ab856_add_ios_available_os_updates_fields.py
│ │ ├── 0ab46b2f6d8c_create_users_table.py
│ │ ├── 0c4c448f4daf_create_device_users_table.py
│ │ ├── 0e5babc5b9ee_create_vpp_licenses.py
│ │ ├── 1005dc7dea01_os_update_settings.py
│ │ ├── 13358fb3846b_create_subject_alternative_names_table.py
│ │ ├── 1532dff16984_drop_device_groups.py
│ │ ├── 2808deb9fc62_create_dep_configurations.py
│ │ ├── 2f1507bf6dc1_create_application_manifests_table.py
│ │ ├── 3061e56045eb_create_certificate_authority.py
│ │ ├── 3dbf6db7f9eb_application_tags.py
│ │ ├── 3fb4a904979c_general_cleanup.py
│ │ ├── 50188ffaf0cd_create_devices_table.py
│ │ ├── 5b98cc4af6c9_create_profiles_table.py
│ │ ├── 6675e981817e_create_available_os_updates_table.py
│ │ ├── 70ff84113e8f_create_tags.py
│ │ ├── 71818e983100_create_application_sources_table.py
│ │ ├── 71ecf957301a_create_commands_table.py
│ │ ├── 7ab500f58a76_create_installed_payloads.py
│ │ ├── 7cf5787a089e_add_dep_profile_relationships.py
│ │ ├── 7d578eb75092_create_device_groups_table.py
│ │ ├── 80fa1767c7e2_create_oauth_server_models.py
│ │ ├── 875dcce0bf8b_create_vpp_users.py
│ │ ├── 8c866896f76e_create_dep_join_tables.py
│ │ ├── __init__.py
│ │ ├── a1d5ffaa2092_create_installed_applications_table.py
│ │ ├── a2e0af380181_create_dep_profiles.py
│ │ ├── a35eeb5a216e_create_installed_profiles_table.py
│ │ ├── a3ddaad5c358_add_dep_device_columns.py
│ │ ├── af4ba256efde_create_certificates_table.py
│ │ ├── b231394ab475_add_scep_config_source_types.py
│ │ ├── b74ca08cfd9a_create_applications_tables.py
│ │ ├── ba4849d8c8ad_create_device_group_devices_table.py
│ │ ├── d5b32b5cc74e_add_dep_profile_id_to_device.py
│ │ ├── dd74229d17b9_create_payload_dependencies_table.py
│ │ ├── e16577adc4fd_create_installed_certificates_table.py
│ │ ├── e5840df9a88a_create_scep_payload_table.py
│ │ ├── e58afdc17baa_create_rsa_private_keys_table.py
│ │ ├── e78274be170e_create_organizations_table.py
│ │ ├── e947cdf82307_add_ios_installed_application_fields.py
│ │ ├── e9b0a4f7b595_create_payloads_table.py
│ │ ├── ea34ae3f1e7e_create_profile_payloads_table.py
│ │ ├── f029ac1af3f0_create_vpp_accounts.py
│ │ ├── f5237c7e2374_create_scep_config_table.py
│ │ ├── f8eb70b3aa2b_create_application_manifests.py
│ │ └── fa4d91c6aacf_create_managed_applications_table.py
│ ├── api/
│ │ ├── __init__.py
│ │ ├── app_json.py
│ │ ├── app_jsonapi.py
│ │ ├── configuration.py
│ │ ├── resources.py
│ │ └── schema.py
│ ├── apns/
│ │ ├── __init__.py
│ │ ├── app.py
│ │ ├── mdmcert.py
│ │ ├── push.py
│ │ ├── schema.py
│ │ └── threads.py
│ ├── app.py
│ ├── apps/
│ │ ├── __init__.py
│ │ ├── app_jsonapi.py
│ │ ├── models.py
│ │ ├── resources.py
│ │ └── schema.py
│ ├── auth/
│ │ ├── __init__.py
│ │ ├── app.py
│ │ ├── models.py
│ │ └── oauth2.py
│ ├── cli.py
│ ├── cms/
│ │ ├── __init__.py
│ │ └── decorators.py
│ ├── dbtypes.py
│ ├── decorators.py
│ ├── default_settings.py
│ ├── dep/
│ │ ├── __init__.py
│ │ ├── app.py
│ │ ├── apple_schema.py
│ │ ├── cli.py
│ │ ├── dep.py
│ │ ├── errors.py
│ │ ├── models.py
│ │ ├── resources.py
│ │ ├── schema.py
│ │ ├── smime.py
│ │ └── threads.py
│ ├── deprecated/
│ │ ├── models.py
│ │ └── schema.py
│ ├── enroll/
│ │ ├── __init__.py
│ │ ├── app.py
│ │ ├── profiles.py
│ │ └── util.py
│ ├── errors.py
│ ├── inventory/
│ │ ├── __init__.py
│ │ ├── api.py
│ │ ├── models.py
│ │ ├── resources.py
│ │ └── schema.py
│ ├── mdm/
│ │ ├── __init__.py
│ │ ├── api.py
│ │ ├── app.py
│ │ ├── commands.py
│ │ ├── decorators.py
│ │ ├── handlers.py
│ │ ├── models.py
│ │ ├── resources.py
│ │ ├── response_schema.py
│ │ ├── routers.py
│ │ ├── schema.py
│ │ └── util.py
│ ├── models.py
│ ├── mutablelist.py
│ ├── omdm/
│ │ ├── __init__.py
│ │ └── models.py
│ ├── pkg/
│ │ ├── __init__.py
│ │ ├── appmanifest.py
│ │ ├── manifest.py
│ │ ├── old_app_manifest.py
│ │ └── schema.py
│ ├── pki/
│ │ ├── ca.py
│ │ ├── models.py
│ │ ├── openssl.py
│ │ ├── ormutils.py
│ │ ├── serialization.py
│ │ └── ssl.py
│ ├── plistutil/
│ │ ├── __init__.py
│ │ └── nonewriter.py
│ ├── profiles/
│ │ ├── __init__.py
│ │ ├── ad.py
│ │ ├── api.py
│ │ ├── certificates.py
│ │ ├── eap.py
│ │ ├── email.py
│ │ ├── energy.py
│ │ ├── models.py
│ │ ├── plist_schema.py
│ │ ├── resources.py
│ │ ├── schema.py
│ │ ├── vpn.py
│ │ └── wifi.py
│ ├── signals.py
│ ├── static/
│ │ ├── .gitignore
│ │ ├── index.dev.html
│ │ └── index.html
│ ├── storage/
│ │ └── .gitignore
│ ├── templates/
│ │ └── index.html
│ ├── threads/
│ │ ├── __init__.py
│ │ ├── startup_thread.py
│ │ └── vpp_thread.py
│ ├── utils.py
│ └── vpp/
│ ├── __init__.py
│ ├── app.py
│ ├── cli.py
│ ├── decorators.py
│ ├── enum.py
│ ├── errors.py
│ ├── models.py
│ ├── schema.py
│ └── vpp.py
├── doc/
│ ├── .gitignore
│ ├── Makefile
│ ├── _static/
│ │ ├── config/
│ │ │ ├── nginx-commandment.conf
│ │ │ └── uwsgi-commandment.ini
│ │ └── uml/
│ │ ├── checkin.puml
│ │ ├── commandqueue.puml
│ │ └── models/
│ │ ├── Certificate.plantuml
│ │ ├── Command.plantuml
│ │ ├── InstalledApplication.plantuml
│ │ ├── InstalledCertificate.plantuml
│ │ └── InstalledProfile.plantuml
│ ├── about-mdm.rst
│ ├── api/
│ │ ├── certificates.rst
│ │ ├── commands.rst
│ │ ├── dep.rst
│ │ ├── devices.rst
│ │ ├── index.rst
│ │ └── organization.rst
│ ├── conf.py
│ ├── dev/
│ │ └── MUSINGS.rst
│ ├── developer/
│ │ ├── guide/
│ │ │ ├── architecture.rst
│ │ │ ├── building.rst
│ │ │ ├── index.rst
│ │ │ └── running.rst
│ │ ├── index.rst
│ │ └── microservices.rst
│ ├── guides/
│ │ ├── INSTALL.md
│ │ ├── nginx.rst
│ │ └── scep.rst
│ ├── index.rst
│ ├── installing/
│ │ ├── index.rst
│ │ ├── install.rst
│ │ ├── macos.rst
│ │ └── ubuntu-server.rst
│ ├── internal/
│ │ ├── api/
│ │ │ ├── api.rst
│ │ │ ├── index.rst
│ │ │ └── json-api.rst
│ │ ├── cms/
│ │ │ ├── decorators.rst
│ │ │ └── index.rst
│ │ ├── core/
│ │ │ ├── index.rst
│ │ │ ├── models/
│ │ │ │ ├── certificate.rst
│ │ │ │ ├── certificate_request.rst
│ │ │ │ ├── command.rst
│ │ │ │ ├── device.rst
│ │ │ │ ├── index.rst
│ │ │ │ ├── installed_application.rst
│ │ │ │ ├── installed_certificate.rst
│ │ │ │ ├── installed_profile.rst
│ │ │ │ ├── organization.rst
│ │ │ │ ├── profile.rst
│ │ │ │ └── rsa_private_key.rst
│ │ │ └── signals.rst
│ │ ├── decorators.rst
│ │ ├── dep/
│ │ │ ├── dep.rst
│ │ │ ├── index.rst
│ │ │ ├── models.rst
│ │ │ └── types.rst
│ │ ├── enroll/
│ │ │ ├── app.rst
│ │ │ └── index.rst
│ │ ├── flask/
│ │ │ ├── configuration.rst
│ │ │ └── index.rst
│ │ ├── index.rst
│ │ ├── mdm/
│ │ │ ├── app.rst
│ │ │ ├── handlers.rst
│ │ │ ├── index.rst
│ │ │ └── types.rst
│ │ ├── push.rst
│ │ ├── vpp/
│ │ │ ├── decorators.rst
│ │ │ ├── enum.rst
│ │ │ ├── errors.rst
│ │ │ ├── index.rst
│ │ │ ├── operations.rst
│ │ │ └── vpp.rst
│ │ └── workers/
│ │ ├── index.rst
│ │ └── runner.rst
│ ├── make.bat
│ ├── sadisplay/
│ │ └── models.py
│ └── user/
│ ├── configuration.rst
│ ├── dep.rst
│ └── index.rst
├── docker-compose.yml
├── mypy.ini
├── pytest.ini
├── settings.cfg.example
├── setup.cfg
├── setup.py
├── testdata/
│ ├── Authenticate/
│ │ ├── 10.11.x.xml
│ │ ├── 10.12.2.xml
│ │ ├── IOS-11.3.1.xml
│ │ ├── IOS-9.x.xml
│ │ └── iOS-11.3.1-cell.xml
│ ├── AvailableOSUpdates/
│ │ ├── 10.12.5.xml
│ │ ├── iOS-11.3.1.xml
│ │ └── macOS-10.13.1.xml
│ ├── CertificateList/
│ │ ├── 10.11.x.xml
│ │ └── iOS-11.3.1.xml
│ ├── CheckOut/
│ │ ├── 10.11.x.xml
│ │ └── iOS-11.3.1.xml
│ ├── DeviceInformation/
│ │ ├── 10.11.x.xml
│ │ ├── iOS-11.3.1.xml
│ │ └── macOS-10.13.1.xml
│ ├── DeviceLock/
│ │ └── iOS-11.3.1.xml
│ ├── Errors/
│ │ ├── 10.12.5-invalid-command.xml
│ │ ├── 10.13.6-invalid-command.xml
│ │ ├── error_invalid_request_type.plist
│ │ ├── iOS-11.3.1-AvailableOSUpdatesFailure.xml
│ │ ├── iOS-11.3.1-CommandFormatError.xml
│ │ └── iOS-11.3.1-RemoveProfile-Unmanaged.xml
│ ├── InstallApplication/
│ │ ├── iOS-11.3.1-alreadyprompting.xml
│ │ ├── iOS-12.1-prompting.xml
│ │ └── manifests/
│ │ ├── Microsoft_AutoUpdate-3.11.17101000.plist
│ │ ├── OneDrive-17.3.7078.1101.plist
│ │ ├── SkypeForBusinessInstaller-16.12.0.77.plist
│ │ ├── dotnet-sdk-2.0.2-osx-x64.plist
│ │ └── munkitools-3.1.0.3430.plist
│ ├── InstalledApplicationList/
│ │ ├── 10.11.x.xml
│ │ ├── iOS-11.3.1.xml
│ │ └── iOS-12.1.xml
│ ├── ManagedApplicationList/
│ │ ├── iOS-11.3.1-Failed.xml
│ │ ├── iOS-12.1-Failed.xml
│ │ ├── iOS-12.1-Installing.xml
│ │ ├── iOS-12.1-Managed.xml
│ │ └── iOS-12.1-RejectedPrompting.xml
│ ├── NotNow/
│ │ └── iOS-11.3.1.xml
│ ├── ProfileList/
│ │ ├── 10.11.x.xml
│ │ └── iOS-11.3.1.xml
│ ├── README.rst
│ ├── SecurityInfo/
│ │ ├── 10.11.x.xml
│ │ ├── IOS-9.x.xml
│ │ ├── iOS-11.3.1.xml
│ │ └── macOS-10.13.1.xml
│ ├── TokenUpdate/
│ │ ├── 10.11.x-user.plist
│ │ ├── 10.11.x.plist
│ │ ├── 10.12.2-user.xml
│ │ ├── 10.12.2.xml
│ │ └── iOS-11.3.1.xml
│ ├── decrypt_dep_token.sh
│ ├── dep/
│ │ └── profile.xml
│ ├── itunes/
│ │ ├── ios-search-slack.json
│ │ └── mas-search-slack.json
│ └── mdmclient-PKIOperation.der
├── tests/
│ ├── __init__.py
│ ├── alembic_test.ini
│ ├── api/
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ └── test_devices.py
│ ├── client.py
│ ├── conftest.py
│ ├── dep/
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ ├── test_dep.py
│ │ ├── test_dep_app.py
│ │ ├── test_dep_failures.py
│ │ ├── test_dep_live.py
│ │ └── test_smime.py
│ ├── mdm/
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ ├── test_available_os_updates.py
│ │ ├── test_certificate_list.py
│ │ ├── test_checkin.py
│ │ ├── test_device_information.py
│ │ ├── test_installed_application_list.py
│ │ ├── test_profile_list.py
│ │ └── test_security_info.py
│ ├── pkg/
│ │ └── __init__.py
│ ├── pki/
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ ├── test_ca.py
│ │ ├── test_models.py
│ │ ├── test_openssl.py
│ │ └── test_ormutils.py
│ ├── test_api_flat.py
│ ├── test_mdmcert.py
│ ├── threads/
│ │ ├── __init__.py
│ │ └── test_startup_thread.py
│ └── vpp/
│ ├── __init__.py
│ ├── conftest.py
│ └── vpp_test.py
├── travis-ci-settings.cfg
└── ui/
├── .eslintrc.js
├── .gitignore
├── .storybook/
│ ├── config.js
│ ├── preview-head.html
│ └── webpack.config.js
├── _deprecated/
│ ├── AssistantPage.tsx
│ ├── DeviceGroupPage.tsx
│ ├── DeviceGroupsPage.tsx
│ ├── InternalCAPage.tsx
│ ├── MDMPage.tsx
│ ├── SCEPConfigurationForm.tsx
│ ├── SSLPage.tsx
│ └── assistant/
│ ├── APNSConfiguration.tsx
│ ├── FinalStep.tsx
│ ├── SCEPConfiguration.tsx
│ └── SSLConfiguration.tsx
├── babel.config.js
├── package.json
├── sass/
│ ├── _dropzone.scss
│ ├── _helper.scss
│ ├── _nav.scss
│ ├── _settings.scss
│ ├── _upload.scss
│ └── app.scss
├── src/
│ ├── @types/
│ │ ├── byte-size/
│ │ │ └── index.d.ts
│ │ └── redux-api-middleware/
│ │ └── index.d.ts
│ ├── components/
│ │ ├── ActionMenu.tsx
│ │ ├── App.tsx
│ │ ├── BareLayout.tsx
│ │ ├── CertificateTypeIcon.tsx
│ │ ├── CheckListItem.tsx
│ │ ├── DeviceActions.tsx
│ │ ├── Navigation.scss
│ │ ├── Navigation.tsx
│ │ ├── NavigationLayout.tsx
│ │ ├── NavigationVertical.tsx
│ │ ├── ProtectedRoute.tsx
│ │ ├── RSAAApiErrorMessage.tsx
│ │ ├── SearchInput.tsx
│ │ ├── TagDropdown.tsx
│ │ ├── devices/
│ │ │ ├── DEPDeviceDetail.tsx
│ │ │ ├── IOSDeviceDetail.tsx
│ │ │ ├── MacOSDeviceDetail.scss
│ │ │ ├── MacOSDeviceDetail.tsx
│ │ │ └── ModelIcon.tsx
│ │ ├── errors/
│ │ │ └── ApiError.tsx
│ │ ├── formik/
│ │ │ └── FormikCheckbox.tsx
│ │ ├── forms/
│ │ │ ├── DEPAccountForm.tsx
│ │ │ ├── DEPProfileForm.tsx
│ │ │ ├── DeviceAuthForm.tsx
│ │ │ └── OrganizationForm.tsx
│ │ ├── itunes/
│ │ │ └── MASResult.tsx
│ │ ├── modals/
│ │ │ ├── DeviceRenameModal.tsx
│ │ │ └── ProfileUploadModal.tsx
│ │ ├── react-table/
│ │ │ ├── AppName.tsx
│ │ │ ├── ApplicationType.tsx
│ │ │ ├── ByteSize.tsx
│ │ │ ├── CommandStatus.tsx
│ │ │ ├── DEPAccountServerName.tsx
│ │ │ ├── DEPProfileName.tsx
│ │ │ ├── DeviceName.tsx
│ │ │ ├── ObjectLink.tsx
│ │ │ ├── ProfileName.tsx
│ │ │ ├── RelativeToNow.tsx
│ │ │ └── SUISelectionTools.tsx
│ │ ├── react-tables/
│ │ │ ├── AppDeployStatusTable.tsx
│ │ │ ├── ApplicationsTable.tsx
│ │ │ ├── DEPAccountsTable.tsx
│ │ │ ├── DEPProfilesTable.tsx
│ │ │ ├── DeviceApplicationsTable.tsx
│ │ │ ├── DeviceCertificatesTable.tsx
│ │ │ ├── DeviceCommandsTable.tsx
│ │ │ ├── DeviceProfilesTable.tsx
│ │ │ ├── DeviceUpdatesTable.tsx
│ │ │ ├── DevicesTable.tsx
│ │ │ └── ProfilesTable.tsx
│ │ ├── semantic-ui/
│ │ │ ├── ButtonLink.tsx
│ │ │ └── MenuItemLink.tsx
│ │ └── vpp/
│ │ └── VPPAccountDetail.tsx
│ ├── constants.ts
│ ├── containers/
│ │ ├── AppStorePage.tsx
│ │ ├── ApplicationPage.tsx
│ │ ├── ApplicationsPage.tsx
│ │ ├── DEPAccountPage.tsx
│ │ ├── DEPProfilePage.tsx
│ │ ├── DashboardPage.tsx
│ │ ├── DevicePage.tsx
│ │ ├── DeviceRename.tsx
│ │ ├── DevicesPage.tsx
│ │ ├── LoginPage.tsx
│ │ ├── LogoutPage.tsx
│ │ ├── ProfilePage.tsx
│ │ ├── ProfileUpload.tsx
│ │ ├── ProfilesPage.tsx
│ │ ├── SettingsPage.tsx
│ │ ├── applications/
│ │ │ ├── ApplicationDeviceStatus.tsx
│ │ │ └── MacOSEntApplicationPage.tsx
│ │ ├── config/
│ │ │ ├── DeviceAuthPage.tsx
│ │ │ └── OrganizationPage.tsx
│ │ ├── devices/
│ │ │ ├── DeviceApplications.tsx
│ │ │ ├── DeviceCertificates.tsx
│ │ │ ├── DeviceCommands.tsx
│ │ │ ├── DeviceDetail.tsx
│ │ │ ├── DeviceOSUpdates.tsx
│ │ │ └── DeviceProfiles.tsx
│ │ └── settings/
│ │ ├── APNSPage.tsx
│ │ ├── DEPAccountSetupPage.tsx
│ │ ├── DEPAccountsPage.tsx
│ │ └── VPPAccountsPage.tsx
│ ├── entry.tsx
│ ├── flask-rest-jsonapi.ts
│ ├── forms/
│ │ ├── ApplicationForm.tsx
│ │ └── DeviceGroupForm.tsx
│ ├── guards.ts
│ ├── hooks/
│ │ └── useForm.ts
│ ├── json-api-v1.ts
│ ├── models.ts
│ ├── reducers/
│ │ ├── index.ts
│ │ └── interfaces.ts
│ ├── selectors/
│ │ └── device.ts
│ ├── store/
│ │ ├── applications/
│ │ │ ├── actions.ts
│ │ │ ├── itunes.ts
│ │ │ ├── list_reducer.ts
│ │ │ ├── managed.ts
│ │ │ ├── managed_reducer.ts
│ │ │ ├── reducer.ts
│ │ │ └── types.ts
│ │ ├── assistant/
│ │ │ ├── actions.ts
│ │ │ └── reducer.ts
│ │ ├── auth/
│ │ │ ├── actions.ts
│ │ │ ├── reducer.ts
│ │ │ └── types.ts
│ │ ├── certificates/
│ │ │ ├── actions.ts
│ │ │ ├── ca_actions.ts
│ │ │ ├── ca_reducer.ts
│ │ │ ├── push_actions.ts
│ │ │ ├── push_reducer.ts
│ │ │ ├── reducer.ts
│ │ │ ├── ssl_actions.ts
│ │ │ ├── ssl_reducer.ts
│ │ │ └── types.ts
│ │ ├── commands/
│ │ │ ├── actions.ts
│ │ │ └── reducer.ts
│ │ ├── configuration/
│ │ │ ├── apns_reducer.ts
│ │ │ ├── mdmcert_actions.ts
│ │ │ ├── reducer.ts
│ │ │ ├── scep_actions.ts
│ │ │ ├── scep_reducer.ts
│ │ │ ├── types.ts
│ │ │ ├── vpp.ts
│ │ │ └── vpp_reducer.ts
│ │ ├── configureStore.ts
│ │ ├── constants.ts
│ │ ├── dep/
│ │ │ ├── account_reducer.ts
│ │ │ ├── accounts_reducer.ts
│ │ │ ├── actions.ts
│ │ │ ├── profile_reducer.ts
│ │ │ ├── profiles_reducer.ts
│ │ │ ├── reducer.ts
│ │ │ └── types.ts
│ │ ├── device/
│ │ │ ├── actions.ts
│ │ │ ├── applications.ts
│ │ │ ├── available_os_updates_reducer.ts
│ │ │ ├── certificates.ts
│ │ │ ├── commands_reducer.ts
│ │ │ ├── installed_applications_reducer.ts
│ │ │ ├── installed_certificates_reducer.ts
│ │ │ ├── installed_profiles_reducer.ts
│ │ │ ├── profiles.ts
│ │ │ ├── reducer.ts
│ │ │ ├── types.ts
│ │ │ └── updates.ts
│ │ ├── device_groups/
│ │ │ ├── actions.ts
│ │ │ ├── reducer.ts
│ │ │ └── types.ts
│ │ ├── devices/
│ │ │ ├── actions.ts
│ │ │ └── devices.ts
│ │ ├── json-api.ts
│ │ ├── mdm.ts
│ │ ├── organization/
│ │ │ ├── actions.ts
│ │ │ ├── reducer.ts
│ │ │ └── types.ts
│ │ ├── pki/
│ │ │ ├── actions.ts
│ │ │ └── types.ts
│ │ ├── profile/
│ │ │ └── reducer.ts
│ │ ├── profiles/
│ │ │ ├── actions.ts
│ │ │ ├── reducer.ts
│ │ │ └── types.ts
│ │ ├── redux-api-middleware.ts
│ │ ├── table/
│ │ │ ├── actions.ts
│ │ │ ├── reducer.ts
│ │ │ └── types.ts
│ │ └── tags/
│ │ ├── actions.ts
│ │ ├── reducer.ts
│ │ └── types.ts
│ └── stories/
│ ├── DEPProfileForm.tsx
│ ├── index.ts
│ └── redux.tsx
├── tsconfig.json
├── tslint.json
├── webpack.config.hmr.js
├── webpack.config.js
└── webpack.config.prod.js
SYMBOL INDEX (1754 symbols across 336 files)
FILE: commandment/__init__.py
function create_app (line 32) | def create_app(config_file: Optional[Union[str, PurePath]] = None) -> Fl...
FILE: commandment/ac2/ac2_app.py
function mdm_service_config (line 7) | def mdm_service_config():
FILE: commandment/alembic/disabled_versions/072fba4a2256_create_ad_payload_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 46) | def downgrade():
FILE: commandment/alembic/disabled_versions/18412434fb57_create_energy_saver_payload_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 36) | def downgrade():
FILE: commandment/alembic/disabled_versions/323a90039a6a_create_email_payload_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 40) | def downgrade():
FILE: commandment/alembic/disabled_versions/4eddbcb30464_create_mdm_payload_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 36) | def downgrade():
FILE: commandment/alembic/disabled_versions/8186b8ecf0fc_create_ad_cert_payload_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 38) | def downgrade():
FILE: commandment/alembic/disabled_versions/9dd4e48235e3_create_vpn_payload_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 33) | def downgrade():
FILE: commandment/alembic/disabled_versions/d65049bf4b91_create_wifi_payload_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 49) | def downgrade():
FILE: commandment/alembic/disabled_versions/da52b64b865f_create_apps_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 34) | def downgrade():
FILE: commandment/alembic/disabled_versions/e47e29a9537c_create_certificate_payload_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 30) | def downgrade():
FILE: commandment/alembic/disabled_versions/fc0c134cbb2e_create_password_policy_payload_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 38) | def downgrade():
FILE: commandment/alembic/env.py
function run_migrations_offline (line 31) | def run_migrations_offline():
function run_migrations_online (line 51) | def run_migrations_online():
FILE: commandment/alembic/versions/0201b96ab856_add_ios_available_os_updates_fields.py
function upgrade (line 25) | def upgrade():
function downgrade (line 31) | def downgrade():
function schema_upgrades (line 37) | def schema_upgrades():
function schema_downgrades (line 44) | def schema_downgrades():
FILE: commandment/alembic/versions/0ab46b2f6d8c_create_users_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 29) | def downgrade():
FILE: commandment/alembic/versions/0c4c448f4daf_create_device_users_table.py
function upgrade (line 20) | def upgrade():
function downgrade (line 35) | def downgrade():
FILE: commandment/alembic/versions/0e5babc5b9ee_create_vpp_licenses.py
function upgrade (line 22) | def upgrade():
function downgrade (line 28) | def downgrade():
function schema_upgrades (line 34) | def schema_upgrades():
function schema_downgrades (line 52) | def schema_downgrades():
function data_upgrades (line 57) | def data_upgrades():
function data_downgrades (line 62) | def data_downgrades():
FILE: commandment/alembic/versions/1005dc7dea01_os_update_settings.py
function upgrade (line 25) | def upgrade():
function downgrade (line 31) | def downgrade():
function schema_upgrades (line 37) | def schema_upgrades():
function schema_downgrades (line 51) | def schema_downgrades():
function data_upgrades (line 65) | def data_upgrades():
function data_downgrades (line 70) | def data_downgrades():
FILE: commandment/alembic/versions/13358fb3846b_create_subject_alternative_names_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 29) | def downgrade():
FILE: commandment/alembic/versions/1532dff16984_drop_device_groups.py
function upgrade (line 24) | def upgrade():
function downgrade (line 30) | def downgrade():
function schema_upgrades (line 36) | def schema_upgrades():
function schema_downgrades (line 42) | def schema_downgrades():
function data_upgrades (line 58) | def data_upgrades():
function data_downgrades (line 63) | def data_downgrades():
FILE: commandment/alembic/versions/2808deb9fc62_create_dep_configurations.py
function upgrade (line 25) | def upgrade():
function downgrade (line 31) | def downgrade():
function schema_upgrades (line 37) | def schema_upgrades():
function schema_downgrades (line 69) | def schema_downgrades():
FILE: commandment/alembic/versions/2f1507bf6dc1_create_application_manifests_table.py
function upgrade (line 22) | def upgrade():
function downgrade (line 28) | def downgrade():
function schema_upgrades (line 34) | def schema_upgrades():
function schema_downgrades (line 91) | def schema_downgrades():
function data_upgrades (line 106) | def data_upgrades():
function data_downgrades (line 111) | def data_downgrades():
FILE: commandment/alembic/versions/3061e56045eb_create_certificate_authority.py
function upgrade (line 25) | def upgrade():
function downgrade (line 31) | def downgrade():
function schema_upgrades (line 37) | def schema_upgrades():
function schema_downgrades (line 55) | def schema_downgrades():
FILE: commandment/alembic/versions/3dbf6db7f9eb_application_tags.py
function upgrade (line 25) | def upgrade():
function downgrade (line 31) | def downgrade():
function schema_upgrades (line 37) | def schema_upgrades():
function schema_downgrades (line 48) | def schema_downgrades():
FILE: commandment/alembic/versions/3fb4a904979c_general_cleanup.py
function upgrade (line 24) | def upgrade():
function downgrade (line 30) | def downgrade():
function schema_upgrades (line 36) | def schema_upgrades():
function schema_downgrades (line 42) | def schema_downgrades():
function data_upgrades (line 63) | def data_upgrades():
function data_downgrades (line 68) | def data_downgrades():
FILE: commandment/alembic/versions/50188ffaf0cd_create_devices_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 100) | def downgrade():
FILE: commandment/alembic/versions/5b98cc4af6c9_create_profiles_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 42) | def downgrade():
FILE: commandment/alembic/versions/6675e981817e_create_available_os_updates_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 25) | def downgrade():
function schema_upgrades (line 31) | def schema_upgrades():
function schema_downgrades (line 53) | def schema_downgrades():
function data_upgrades (line 58) | def data_upgrades():
function data_downgrades (line 63) | def data_downgrades():
FILE: commandment/alembic/versions/70ff84113e8f_create_tags.py
function upgrade (line 19) | def upgrade():
function downgrade (line 42) | def downgrade():
FILE: commandment/alembic/versions/71818e983100_create_application_sources_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 34) | def downgrade():
FILE: commandment/alembic/versions/71ecf957301a_create_commands_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 39) | def downgrade():
FILE: commandment/alembic/versions/7ab500f58a76_create_installed_payloads.py
function upgrade (line 22) | def upgrade():
function downgrade (line 28) | def downgrade():
function schema_upgrades (line 34) | def schema_upgrades():
function schema_downgrades (line 52) | def schema_downgrades():
function data_upgrades (line 57) | def data_upgrades():
function data_downgrades (line 62) | def data_downgrades():
FILE: commandment/alembic/versions/7cf5787a089e_add_dep_profile_relationships.py
function upgrade (line 25) | def upgrade():
function downgrade (line 31) | def downgrade():
function schema_upgrades (line 37) | def schema_upgrades():
function schema_downgrades (line 48) | def schema_downgrades():
FILE: commandment/alembic/versions/7d578eb75092_create_device_groups_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 27) | def downgrade():
FILE: commandment/alembic/versions/80fa1767c7e2_create_oauth_server_models.py
function upgrade (line 25) | def upgrade():
function downgrade (line 29) | def downgrade():
function schema_upgrades (line 33) | def schema_upgrades():
function schema_downgrades (line 91) | def schema_downgrades():
FILE: commandment/alembic/versions/875dcce0bf8b_create_vpp_users.py
function upgrade (line 22) | def upgrade():
function downgrade (line 28) | def downgrade():
function schema_upgrades (line 34) | def schema_upgrades():
function schema_downgrades (line 47) | def schema_downgrades():
function data_upgrades (line 52) | def data_upgrades():
function data_downgrades (line 57) | def data_downgrades():
FILE: commandment/alembic/versions/8c866896f76e_create_dep_join_tables.py
function upgrade (line 22) | def upgrade():
function downgrade (line 28) | def downgrade():
function schema_upgrades (line 34) | def schema_upgrades():
function schema_downgrades (line 50) | def schema_downgrades():
function data_upgrades (line 56) | def data_upgrades():
function data_downgrades (line 61) | def data_downgrades():
FILE: commandment/alembic/versions/a1d5ffaa2092_create_installed_applications_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 40) | def downgrade():
FILE: commandment/alembic/versions/a2e0af380181_create_dep_profiles.py
function upgrade (line 21) | def upgrade():
function downgrade (line 26) | def downgrade():
function schema_upgrades (line 31) | def schema_upgrades():
function schema_downgrades (line 55) | def schema_downgrades():
function data_upgrades (line 62) | def data_upgrades():
function data_downgrades (line 66) | def data_downgrades():
FILE: commandment/alembic/versions/a35eeb5a216e_create_installed_profiles_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 40) | def downgrade():
FILE: commandment/alembic/versions/a3ddaad5c358_add_dep_device_columns.py
function upgrade (line 25) | def upgrade():
function downgrade (line 31) | def downgrade():
function schema_upgrades (line 37) | def schema_upgrades():
function schema_downgrades (line 52) | def schema_downgrades():
FILE: commandment/alembic/versions/af4ba256efde_create_certificates_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 43) | def downgrade():
FILE: commandment/alembic/versions/b231394ab475_add_scep_config_source_types.py
function upgrade (line 25) | def upgrade():
function downgrade (line 29) | def downgrade():
function schema_upgrades (line 33) | def schema_upgrades():
function schema_downgrades (line 37) | def schema_downgrades():
FILE: commandment/alembic/versions/b74ca08cfd9a_create_applications_tables.py
function upgrade (line 21) | def upgrade():
function downgrade (line 27) | def downgrade():
function schema_upgrades (line 33) | def schema_upgrades():
function schema_downgrades (line 67) | def schema_downgrades():
function data_upgrades (line 75) | def data_upgrades():
function data_downgrades (line 80) | def data_downgrades():
FILE: commandment/alembic/versions/ba4849d8c8ad_create_device_group_devices_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 29) | def downgrade():
FILE: commandment/alembic/versions/d5b32b5cc74e_add_dep_profile_id_to_device.py
function upgrade (line 25) | def upgrade():
function downgrade (line 31) | def downgrade():
function schema_upgrades (line 37) | def schema_upgrades():
function schema_downgrades (line 44) | def schema_downgrades():
function data_upgrades (line 51) | def data_upgrades():
function data_downgrades (line 56) | def data_downgrades():
FILE: commandment/alembic/versions/dd74229d17b9_create_payload_dependencies_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 28) | def downgrade():
FILE: commandment/alembic/versions/e16577adc4fd_create_installed_certificates_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 35) | def downgrade():
FILE: commandment/alembic/versions/e5840df9a88a_create_scep_payload_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 39) | def downgrade():
FILE: commandment/alembic/versions/e58afdc17baa_create_rsa_private_keys_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 27) | def downgrade():
FILE: commandment/alembic/versions/e78274be170e_create_organizations_table.py
function upgrade (line 40) | def upgrade():
function downgrade (line 46) | def downgrade():
function schema_upgrades (line 52) | def schema_upgrades():
function schema_downgrades (line 56) | def schema_downgrades():
function data_upgrades (line 60) | def data_upgrades():
function data_downgrades (line 68) | def data_downgrades():
FILE: commandment/alembic/versions/e947cdf82307_add_ios_installed_application_fields.py
function upgrade (line 25) | def upgrade():
function downgrade (line 31) | def downgrade():
function schema_upgrades (line 37) | def schema_upgrades():
function schema_downgrades (line 48) | def schema_downgrades():
FILE: commandment/alembic/versions/e9b0a4f7b595_create_payloads_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 35) | def downgrade():
FILE: commandment/alembic/versions/ea34ae3f1e7e_create_profile_payloads_table.py
function upgrade (line 19) | def upgrade():
function downgrade (line 28) | def downgrade():
FILE: commandment/alembic/versions/f029ac1af3f0_create_vpp_accounts.py
function upgrade (line 22) | def upgrade():
function downgrade (line 28) | def downgrade():
function schema_upgrades (line 34) | def schema_upgrades():
function schema_downgrades (line 47) | def schema_downgrades():
function data_upgrades (line 52) | def data_upgrades():
function data_downgrades (line 57) | def data_downgrades():
FILE: commandment/alembic/versions/f5237c7e2374_create_scep_config_table.py
function upgrade (line 47) | def upgrade():
function downgrade (line 53) | def downgrade():
function schema_upgrades (line 59) | def schema_upgrades():
function schema_downgrades (line 63) | def schema_downgrades():
function data_upgrades (line 67) | def data_upgrades():
function data_downgrades (line 75) | def data_downgrades():
FILE: commandment/alembic/versions/f8eb70b3aa2b_create_application_manifests.py
function upgrade (line 25) | def upgrade():
function downgrade (line 31) | def downgrade():
function schema_upgrades (line 37) | def schema_upgrades():
function schema_downgrades (line 57) | def schema_downgrades():
function data_upgrades (line 77) | def data_upgrades():
function data_downgrades (line 82) | def data_downgrades():
FILE: commandment/alembic/versions/fa4d91c6aacf_create_managed_applications_table.py
function upgrade (line 25) | def upgrade():
function downgrade (line 29) | def downgrade():
function schema_upgrades (line 33) | def schema_upgrades():
function schema_downgrades (line 53) | def schema_downgrades():
FILE: commandment/api/app_json.py
function organization_get (line 32) | def organization_get():
function download_certificate (line 51) | def download_certificate(certificate_id: int):
function download_key (line 71) | def download_key(rsa_private_key_id: int):
function device_test (line 92) | def device_test(device_id: int):
function device_inventory (line 109) | def device_inventory(device_id: int):
function clear_passcode (line 163) | def clear_passcode(device_id: int):
function lock (line 192) | def lock(device_id: int):
function restart (line 221) | def restart(device_id: int):
function shutdown (line 248) | def shutdown(device_id: int):
function upload_profile (line 275) | def upload_profile():
function download_profile (line 334) | def download_profile(profile_id: int):
FILE: commandment/api/configuration.py
function organization_get (line 14) | def organization_get():
function organization_post (line 36) | def organization_post():
function scep_get (line 57) | def scep_get():
function scep_post (line 79) | def scep_post():
FILE: commandment/api/resources.py
class DeviceList (line 19) | class DeviceList(ResourceList):
class DeviceDetail (line 25) | class DeviceDetail(ResourceDetail):
method before_patch (line 33) | def before_patch(self, args, kwargs, data=None):
class DeviceRelationship (line 56) | class DeviceRelationship(ResourceRelationship):
method before_post (line 64) | def before_post(self, args, kwargs, json_data=None):
method before_patch (line 71) | def before_patch(self, args, kwargs, json_data=None):
method after_patch (line 74) | def after_patch(self, result):
class CertificatesList (line 84) | class CertificatesList(ResourceList):
class CertificateDetail (line 89) | class CertificateDetail(ResourceDetail):
class CertificateTypeDetail (line 94) | class CertificateTypeDetail(ResourceDetail):
class PrivateKeyDetail (line 99) | class PrivateKeyDetail(ResourceDetail):
class CertificateSigningRequestList (line 104) | class CertificateSigningRequestList(ResourceList):
class CertificateSigningRequestDetail (line 112) | class CertificateSigningRequestDetail(ResourceDetail):
class PushCertificateList (line 120) | class PushCertificateList(ResourceList):
class CACertificateList (line 128) | class CACertificateList(ResourceList):
class SSLCertificatesList (line 136) | class SSLCertificatesList(ResourceList):
class OrganizationList (line 144) | class OrganizationList(ResourceList):
class OrganizationDetail (line 152) | class OrganizationDetail(ResourceDetail):
class TagsList (line 160) | class TagsList(ResourceList):
class TagDetail (line 169) | class TagDetail(ResourceDetail):
class TagRelationship (line 178) | class TagRelationship(ResourceRelationship):
FILE: commandment/api/schema.py
class DeviceSchema (line 12) | class DeviceSchema(Schema):
class Meta (line 13) | class Meta:
class PrivateKeySchema (line 144) | class PrivateKeySchema(Schema):
class Meta (line 145) | class Meta:
class CertificateSchema (line 155) | class CertificateSchema(Schema):
class Meta (line 156) | class Meta:
class CertificateSigningRequestSchema (line 182) | class CertificateSigningRequestSchema(Schema):
class Meta (line 183) | class Meta:
class OrganizationSchema (line 195) | class OrganizationSchema(Schema):
class Meta (line 196) | class Meta:
class OrganizationFlatSchema (line 211) | class OrganizationFlatSchema(FlatSchema):
method make_organization (line 221) | def make_organization(self, data: dict) -> Organization:
class SCEPConfigFlatSchema (line 235) | class SCEPConfigFlatSchema(FlatSchema):
method make_scepconfig (line 250) | def make_scepconfig(self, data: dict) -> SCEPConfig:
class TagSchema (line 266) | class TagSchema(Schema):
class Meta (line 267) | class Meta:
FILE: commandment/apns/app.py
function push (line 29) | def push(device_id: int):
function mdmcert_request (line 61) | def mdmcert_request(email: str):
function mdmcert_decrypt (line 106) | def mdmcert_decrypt():
FILE: commandment/apns/mdmcert.py
function submit_mdmcert_request (line 30) | def submit_mdmcert_request(email: str, csr_pem: str,
class FixedLocationResponse (line 80) | class FixedLocationResponse(Response):
function decrypt_mdmcert (line 86) | def decrypt_mdmcert(response: bytes, decrypt_with: RSAPrivateKeyWithSeri...
FILE: commandment/apns/push.py
function get_apns (line 20) | def get_apns() -> apns2.APNSClient:
class MDMPayload (line 67) | class MDMPayload(apns2.Payload):
method __init__ (line 69) | def __init__(self, push_magic: str) -> None:
method to_json (line 78) | def to_json(self) -> str:
function push_to_device (line 82) | def push_to_device(device: Device) -> apns2.Response:
FILE: commandment/apns/schema.py
class PushResponseFlatSchema (line 4) | class PushResponseFlatSchema(Schema):
FILE: commandment/apns/threads.py
function start (line 23) | def start(app: Flask):
function stop (line 32) | def stop():
function push_thread_callback (line 42) | def push_thread_callback(app: Flask):
FILE: commandment/apps/__init__.py
class ManagedAppStatus (line 4) | class ManagedAppStatus(Enum):
FILE: commandment/apps/models.py
class ManagementFlag (line 7) | class ManagementFlag(IntFlag):
class PurchaseMethod (line 15) | class PurchaseMethod(IntEnum):
class ApplicationType (line 21) | class ApplicationType(Enum):
class Application (line 37) | class Application(db.Model):
class EnterpriseMacApplication (line 102) | class EnterpriseMacApplication(Application):
class EnterpriseiOSApplication (line 112) | class EnterpriseiOSApplication(Application):
class AppstoreMacApplication (line 123) | class AppstoreMacApplication(Application):
class AppstoreiOSApplication (line 133) | class AppstoreiOSApplication(Application):
class ApplicationManifest (line 143) | class ApplicationManifest(db.Model):
class ApplicationManifestChecksum (line 177) | class ApplicationManifestChecksum(db.Model):
class AppSourceType (line 192) | class AppSourceType(Enum):
class ApplicationSource (line 197) | class ApplicationSource(db.Model):
class ManagedApplication (line 229) | class ManagedApplication(db.Model):
FILE: commandment/apps/resources.py
class ApplicationManifestDetail (line 9) | class ApplicationManifestDetail(ResourceDetail):
class ApplicationDetail (line 18) | class ApplicationDetail(ResourceDetail):
class ApplicationList (line 27) | class ApplicationList(ResourceList):
class ApplicationRelationship (line 36) | class ApplicationRelationship(ResourceRelationship):
class MASApplicationDetail (line 45) | class MASApplicationDetail(ResourceDetail):
class MASApplicationList (line 54) | class MASApplicationList(ResourceList):
class IOSApplicationDetail (line 63) | class IOSApplicationDetail(ResourceDetail):
class IOSApplicationList (line 72) | class IOSApplicationList(ResourceList):
class EnterpriseMacApplicationList (line 81) | class EnterpriseMacApplicationList(ResourceList):
class EnterpriseMacApplicationDetail (line 90) | class EnterpriseMacApplicationDetail(ResourceDetail):
class EnterpriseIosApplicationList (line 99) | class EnterpriseIosApplicationList(ResourceList):
class EnterpriseIosApplicationDetail (line 108) | class EnterpriseIosApplicationDetail(ResourceDetail):
class ManagedApplicationDetail (line 117) | class ManagedApplicationDetail(ResourceDetail):
class ManagedApplicationList (line 126) | class ManagedApplicationList(ResourceList):
method query (line 127) | def query(self, view_kwargs):
class ManagedApplicationRelationship (line 148) | class ManagedApplicationRelationship(ResourceRelationship):
FILE: commandment/apps/schema.py
class ApplicationSchema (line 5) | class ApplicationSchema(Schema):
class Meta (line 6) | class Meta:
class ManagedApplicationSchema (line 49) | class ManagedApplicationSchema(Schema):
class Meta (line 50) | class Meta:
class ApplicationManifestSchema (line 74) | class ApplicationManifestSchema(Schema):
class Meta (line 75) | class Meta:
class ApplicationManifestChecksumSchema (line 94) | class ApplicationManifestChecksumSchema(Schema):
class Meta (line 95) | class Meta:
FILE: commandment/auth/app.py
function issue_token (line 38) | def issue_token():
function revoke_token (line 43) | def revoke_token():
FILE: commandment/auth/models.py
class User (line 5) | class User(db.Model):
method get_user_id (line 13) | def get_user_id(self):
class OAuth2Client (line 18) | class OAuth2Client(db.Model, OAuth2ClientMixin):
class OAuth2Token (line 29) | class OAuth2Token(db.Model, OAuth2TokenMixin):
FILE: commandment/auth/oauth2.py
class ImplicitGrant (line 70) | class ImplicitGrant(_ImplicitGrant):
method create_access_token (line 71) | def create_access_token(self, token, client, grant_user):
class PasswordGrant (line 81) | class PasswordGrant(_PasswordGrant):
method authenticate_user (line 82) | def authenticate_user(self, username, password):
method create_access_token (line 89) | def create_access_token(self, token, client, user):
class ClientCredentialsGrant (line 100) | class ClientCredentialsGrant(_ClientCredentialsGrant):
method create_access_token (line 101) | def create_access_token(self, token, client):
class RefreshTokenGrant (line 111) | class RefreshTokenGrant(_RefreshTokenGrant):
method authenticate_refresh_token (line 112) | def authenticate_refresh_token(self, refresh_token):
method create_access_token (line 117) | def create_access_token(self, token, authenticated_token):
class RevocationEndpoint (line 128) | class RevocationEndpoint(_RevocationEndpoint):
method query_token (line 129) | def query_token(self, token, token_type_hint, client):
method invalidate_token (line 141) | def invalidate_token(self, token):
class CommandmentBearerTokenValidator (line 167) | class CommandmentBearerTokenValidator(BearerTokenValidator):
method authenticate_token (line 168) | def authenticate_token(self, token_string):
method request_invalid (line 171) | def request_invalid(self, request):
method token_revoked (line 174) | def token_revoked(self, token):
class FlaskJSONAPIResourceProtector (line 178) | class FlaskJSONAPIResourceProtector(ResourceProtector):
method verify_request (line 182) | def verify_request(self, scopes):
function init_app (line 200) | def init_app(app):
FILE: commandment/cli.py
function server (line 15) | def server():
FILE: commandment/cms/__init__.py
function _certificate_by_signer_identifier (line 7) | def _certificate_by_signer_identifier(certificates: CertificateSet, sid:...
function _cryptography_hash_function (line 37) | def _cryptography_hash_function(algorithm: DigestAlgorithm) -> Union[Non...
function _cryptography_pad_function (line 61) | def _cryptography_pad_function(algorithm: SignedDigestAlgorithm) -> Unio...
FILE: commandment/cms/decorators.py
function _verify_cms_signers (line 15) | def _verify_cms_signers(signed_data: bytes, detached: bool = False) -> T...
function verify_cms_signers (line 77) | def verify_cms_signers(f):
function verify_mdm_signature (line 107) | def verify_mdm_signature(f):
FILE: commandment/dbtypes.py
class GUID (line 10) | class GUID(TypeDecorator):
method load_dialect_impl (line 19) | def load_dialect_impl(self, dialect):
method process_bind_param (line 25) | def process_bind_param(self, value, dialect):
method process_result_value (line 37) | def process_result_value(self, value, dialect):
function json_datetime_serializer (line 44) | def json_datetime_serializer(o):
class JSONEncodedDict (line 57) | class JSONEncodedDict(TypeDecorator):
method process_bind_param (line 61) | def process_bind_param(self, value, dialect):
method process_result_value (line 67) | def process_result_value(self, value, dialect):
class SetOfEnumValues (line 74) | class SetOfEnumValues(TypeDecorator):
method __init__ (line 78) | def __init__(self, *arg, **kw):
method process_bind_param (line 82) | def process_bind_param(self, value, dialect): # type: (List[Enum], an...
method process_result_value (line 88) | def process_result_value(self, value, dialect):
FILE: commandment/decorators.py
function parse_plist_input_data (line 11) | def parse_plist_input_data(f):
function pem_certificate_upload (line 34) | def pem_certificate_upload(f):
FILE: commandment/dep/__init__.py
class SetupAssistantStep (line 5) | class SetupAssistantStep(Enum):
class DEPProfileRemovalStatus (line 79) | class DEPProfileRemovalStatus(Enum):
class DEPOrgType (line 89) | class DEPOrgType(Enum):
class DEPOrgVersion (line 95) | class DEPOrgVersion(Enum):
class DEPOperationType (line 101) | class DEPOperationType(Enum):
FILE: commandment/dep/app.py
function certificate_download (line 45) | def certificate_download():
function stoken_upload (line 93) | def stoken_upload():
function profile (line 151) | def profile():
function anchor_certs (line 182) | def anchor_certs():
FILE: commandment/dep/apple_schema.py
class AppleDEPProfileSchema (line 6) | class AppleDEPProfileSchema(Schema):
FILE: commandment/dep/cli.py
function initial_dep_fetch (line 16) | async def initial_dep_fetch(dep: DEP):
function dep_sync (line 22) | async def dep_sync(consumer_key: str, consumer_secret: str, access_token...
function main (line 27) | def main():
FILE: commandment/dep/dep.py
class DEPAuth (line 38) | class DEPAuth(AuthBase):
method __init__ (line 44) | def __init__(self, token: str) -> None:
method __call__ (line 47) | def __call__(self, r):
class DEP (line 52) | class DEP:
method __init__ (line 56) | def __init__(self,
method session_token (line 88) | def session_token(self) -> Optional[str]:
method from_token (line 92) | def from_token(cls, token: str): # (str) -> DEP
method _response_hook (line 97) | def _response_hook(self, r: requests.Response, *args, **kwargs):
method send (line 123) | def send(self, req: requests.Request, **kwargs) -> Optional[requests.R...
method fetch_token (line 156) | def fetch_token(self) -> Union[str, None]:
method account (line 171) | def account(self) -> Union[None, dict]:
method fetch_devices (line 194) | def fetch_devices(self, cursor: Union[str, None] = None, limit: int = ...
method sync_devices (line 207) | def sync_devices(self, cursor: str, limit: int = 100) -> dict:
method devices (line 220) | def devices(self, cursor: Union[str, None] = None) -> Iterator:
method device_detail (line 235) | def device_detail(self, *serial_numbers: Union[str, List[str]]):
method define_profile (line 248) | def define_profile(self, profile: dict):
method assign_profile (line 259) | def assign_profile(self, profile_uuid: str, *serial_numbers: List[str]...
method remove_profile (line 274) | def remove_profile(self, *serial_numbers: List[str]) -> DEPProfileRemo...
method profile (line 288) | def profile(self, uuid: str) -> dict:
method activation_lock (line 302) | def activation_lock(self,
method activation_lock_bypass (line 309) | def activation_lock_bypass(self,
method disown (line 320) | def disown(self, *serial_numbers: List[str]):
class DEPBaseCursor (line 328) | class DEPBaseCursor(object):
method __init__ (line 336) | def __init__(self, owner: DEP, results: Optional[dict] = None) -> None:
method cursor (line 341) | def cursor(self) -> Optional[str]:
method more_to_follow (line 347) | def more_to_follow(self) -> bool:
method __iter__ (line 352) | def __iter__(self):
class DEPFetchCursor (line 356) | class DEPFetchCursor(DEPBaseCursor, Iterator):
method __next__ (line 358) | def __next__(self):
class DEPSyncCursor (line 370) | class DEPSyncCursor(DEPBaseCursor, Iterator):
method __init__ (line 372) | def __init__(self, owner: DEP, cursor: str, results: Optional[dict] = ...
method __next__ (line 376) | def __next__(self):
FILE: commandment/dep/errors.py
class DEPServiceError (line 4) | class DEPServiceError(HTTPError):
method __init__ (line 13) | def __init__(self, *args, **kwargs):
method __str__ (line 21) | def __str__(self):
class DEPClientError (line 25) | class DEPClientError(Exception):
FILE: commandment/dep/models.py
class DEPServerTokenCertificate (line 9) | class DEPServerTokenCertificate(Certificate):
method from_crypto (line 16) | def from_crypto(cls, certificate: x509.Certificate):
class DEPAnchorCertificate (line 21) | class DEPAnchorCertificate(Certificate):
class DEPSupervisionCertificate (line 28) | class DEPSupervisionCertificate(Certificate):
class DEPAccount (line 35) | class DEPAccount(db.Model):
class DEPProfile (line 103) | class DEPProfile(db.Model):
FILE: commandment/dep/resources.py
class DEPProfileList (line 7) | class DEPProfileList(ResourceList):
method before_post (line 14) | def before_post(self, args, kwargs, data=None):
class DEPProfileDetail (line 20) | class DEPProfileDetail(ResourceDetail):
class DEPProfileRelationship (line 29) | class DEPProfileRelationship(ResourceRelationship):
class DEPAccountList (line 38) | class DEPAccountList(ResourceList):
class DEPAccountDetail (line 46) | class DEPAccountDetail(ResourceDetail):
FILE: commandment/dep/schema.py
class DEPProfileSchema (line 8) | class DEPProfileSchema(Schema):
class Meta (line 15) | class Meta:
class DEPDeviceSchema (line 85) | class DEPDeviceSchema(Schema):
class DEPDeviceSyncSchema (line 106) | class DEPDeviceSyncSchema(Schema):
class DEPDeviceCursorSchema (line 114) | class DEPDeviceCursorSchema(Schema):
class MDMServiceURL (line 122) | class MDMServiceURL(Schema):
class DEPAccountSchema (line 128) | class DEPAccountSchema(Schema):
class Meta (line 130) | class Meta:
FILE: commandment/dep/smime.py
function decrypt (line 13) | def decrypt(smime: bytes, key: rsa.RSAPrivateKey, serial: Optional[int] ...
function decrypt_smime_content (line 32) | def decrypt_smime_content(payload: bytes, key: rsa.RSAPrivateKey) -> bytes:
FILE: commandment/dep/threads.py
function start (line 42) | def start(app: Flask):
function stop (line 50) | def stop():
function dep_sync_organization (line 58) | def dep_sync_organization(app: Flask, dep: DEP):
function dep_fetch_devices (line 99) | def dep_fetch_devices(app: Flask, dep: DEP, dep_account_id: int):
function dep_define_profiles (line 180) | def dep_define_profiles(app: Flask, dep: DEP):
function dep_thread_callback (line 203) | def dep_thread_callback(app: Flask):
FILE: commandment/deprecated/models.py
class Payload (line 27) | class Payload(db.Model):
class ADCertPayload (line 54) | class ADCertPayload(Payload):
class ADPayload (line 73) | class ADPayload(Payload):
class WIFIPayload (line 123) | class WIFIPayload(Payload):
class VPNPayload (line 159) | class VPNPayload(Payload):
class EmailPayload (line 174) | class EmailPayload(Payload):
class CertificatePayload (line 196) | class CertificatePayload(Payload):
class PEMCertificatePayload (line 206) | class PEMCertificatePayload(CertificatePayload):
class DERCertificatePayload (line 212) | class DERCertificatePayload(CertificatePayload):
class PKCS12CertificatePayload (line 218) | class PKCS12CertificatePayload(CertificatePayload):
class PasswordPolicyPayload (line 224) | class PasswordPolicyPayload(Payload):
class EnergySaverPayload (line 243) | class EnergySaverPayload(Payload):
class MDMPayload (line 260) | class MDMPayload(Payload):
class Profile (line 281) | class Profile(db.Model):
FILE: commandment/deprecated/schema.py
class QoSMarkingPolicy (line 22) | class QoSMarkingPolicy(Schema):
class EAPClientConfiguration (line 28) | class EAPClientConfiguration(Schema):
class EnergySaverSettings (line 123) | class EnergySaverSettings(Schema):
class EnergySaverPowerSchedule (line 131) | class EnergySaverPowerSchedule(Schema):
class EnergySaverSchedules (line 137) | class EnergySaverSchedules(Schema):
class EnergySaverPayload (line 143) | class EnergySaverPayload(Payload):
FILE: commandment/enroll/__init__.py
class DeviceAttributes (line 4) | class DeviceAttributes(Enum):
FILE: commandment/enroll/app.py
function base64_to_pem (line 30) | def base64_to_pem(crypto_type, b64_text, width=76):
function trust_mobileconfig (line 39) | def trust_mobileconfig():
function enroll (line 92) | def enroll():
function ota_enroll (line 110) | def ota_enroll():
function ota_authenticate (line 146) | def ota_authenticate():
FILE: commandment/enroll/profiles.py
function scep_payload_from_configuration (line 15) | def scep_payload_from_configuration() -> SCEPPayload:
function ca_trust_payload_from_configuration (line 70) | def ca_trust_payload_from_configuration() -> PEMCertificatePayload:
function ssl_trust_payload_from_configuration (line 97) | def ssl_trust_payload_from_configuration() -> PEMCertificatePayload:
function identity_payload (line 124) | def identity_payload(private_key: rsa.RSAPrivateKeyWithSerialization,
FILE: commandment/enroll/util.py
function generate_enroll_profile (line 17) | def generate_enroll_profile(pkcs12_payload: Optional[PKCS12CertificatePa...
FILE: commandment/errors.py
class JSONAPIError (line 5) | class JSONAPIError(Exception):
method __init__ (line 7) | def __init__(self, title: str, status: int = 500, code: Optional[str] ...
method to_dict (line 17) | def to_dict(self) -> Dict[str, any]:
FILE: commandment/inventory/api.py
function download_installed_certificate (line 40) | def download_installed_certificate(installed_certificate_id: int):
FILE: commandment/inventory/models.py
class InstalledApplication (line 7) | class InstalledApplication(db.Model):
class InstalledCertificate (line 57) | class InstalledCertificate(db.Model):
class InstalledProfile (line 89) | class InstalledProfile(db.Model):
class InstalledPayload (line 129) | class InstalledPayload(db.Model):
class AvailableOSUpdate (line 153) | class AvailableOSUpdate(db.Model):
FILE: commandment/inventory/resources.py
class InstalledApplicationsList (line 12) | class InstalledApplicationsList(ResourceList):
method query (line 13) | def query(self, view_kwargs):
class InstalledApplicationDetail (line 32) | class InstalledApplicationDetail(ResourceDetail):
class InstalledCertificatesList (line 40) | class InstalledCertificatesList(ResourceList):
method query (line 41) | def query(self, view_kwargs):
class InstalledCertificateDetail (line 61) | class InstalledCertificateDetail(ResourceDetail):
class InstalledProfilesList (line 85) | class InstalledProfilesList(ResourceList):
method query (line 86) | def query(self, view_kwargs):
class InstalledProfileDetail (line 106) | class InstalledProfileDetail(ResourceDetail):
class AvailableOSUpdateList (line 114) | class AvailableOSUpdateList(ResourceList):
method query (line 115) | def query(self, view_kwargs):
class AvailableOSUpdateDetail (line 135) | class AvailableOSUpdateDetail(ResourceDetail):
FILE: commandment/inventory/schema.py
class InstalledProfileSchema (line 5) | class InstalledProfileSchema(Schema):
class Meta (line 6) | class Meta:
class InstalledCertificateSchema (line 31) | class InstalledCertificateSchema(Schema):
class Meta (line 32) | class Meta:
class InstalledApplicationSchema (line 51) | class InstalledApplicationSchema(Schema):
class Meta (line 52) | class Meta:
class AvailableOSUpdateSchema (line 75) | class AvailableOSUpdateSchema(Schema):
class Meta (line 76) | class Meta:
FILE: commandment/mdm/__init__.py
class CommandType (line 5) | class CommandType(Enum):
class Platform (line 73) | class Platform(Enum):
class AccessRights (line 81) | class AccessRights(IntFlag):
method _generate_next_value_ (line 86) | def _generate_next_value_(name, start, count, last_values):
class CommandStatus (line 111) | class CommandStatus(Enum):
class SettingsItem (line 142) | class SettingsItem(Enum):
class WallpaperLocation (line 160) | class WallpaperLocation(IntEnum):
FILE: commandment/mdm/app.py
function authenticate (line 31) | def authenticate(plist_data):
function token_update (line 79) | def token_update(plist_data):
function user_authenticate (line 135) | def user_authenticate(plist_data):
function check_out (line 140) | def check_out(plist_data):
function mdm (line 174) | def mdm():
FILE: commandment/mdm/commands.py
class CommandRegistry (line 12) | class CommandRegistry(type):
method __new__ (line 15) | def __new__(mcs, name, bases, namespace, **kwds):
class Command (line 24) | class Command(metaclass=CommandRegistry):
method __init__ (line 39) | def __init__(self, uuid=None) -> None:
method uuid (line 59) | def uuid(self) -> UUID:
method parameters (line 63) | def parameters(self) -> Dict[str, Any]:
method new_request_type (line 67) | def new_request_type(cls, request_type: str, parameters: dict, uuid: s...
method to_dict (line 88) | def to_dict(self) -> dict:
class DeviceInformation (line 101) | class DeviceInformation(Command):
class Queries (line 105) | class Queries(Enum):
method __init__ (line 266) | def __init__(self, uuid: Optional[UUID]=None, **kwargs) -> None:
method for_platform (line 271) | def for_platform(cls, platform: Platform, min_os_version: str, queries...
method queries (line 306) | def queries(self) -> Set[str]:
method to_dict (line 309) | def to_dict(self) -> dict:
class SecurityInfo (line 320) | class SecurityInfo(Command):
method __init__ (line 324) | def __init__(self, uuid: Optional[UUID]=None, **kwargs) -> None:
class DeviceLock (line 329) | class DeviceLock(Command):
method __init__ (line 333) | def __init__(self, uuid: Optional[UUID]=None, **kwargs) -> None:
method to_dict (line 337) | def to_dict(self) -> dict:
class ClearPasscode (line 355) | class ClearPasscode(Command):
method __init__ (line 360) | def __init__(self, uuid: Optional[UUID]=None, **kwargs) -> None:
method to_dict (line 364) | def to_dict(self) -> dict:
class ProfileList (line 374) | class ProfileList(Command):
method __init__ (line 378) | def __init__(self, uuid: Optional[UUID]=None, **kwargs) -> None:
class InstallProfile (line 383) | class InstallProfile(Command):
method __init__ (line 387) | def __init__(self, uuid: Optional[UUID]=None, **kwargs) -> None:
method to_dict (line 396) | def to_dict(self) -> dict:
class RemoveProfile (line 406) | class RemoveProfile(Command):
method __init__ (line 410) | def __init__(self, uuid: Optional[UUID]=None, **kwargs) -> None:
method to_dict (line 416) | def to_dict(self) -> dict:
class CertificateList (line 427) | class CertificateList(Command):
method __init__ (line 431) | def __init__(self, uuid: Optional[UUID]=None, **kwargs) -> None:
class ProvisioningProfileList (line 436) | class ProvisioningProfileList(Command):
method __init__ (line 440) | def __init__(self, uuid: Optional[UUID]=None, **kwargs):
class InstalledApplicationList (line 445) | class InstalledApplicationList(Command):
method __init__ (line 449) | def __init__(self, uuid: Optional[UUID]=None, **kwargs):
method managed_apps_only (line 455) | def managed_apps_only(self) -> Optional[bool]:
method managed_apps_only (line 459) | def managed_apps_only(self, value: bool) -> None:
method identifiers (line 463) | def identifiers(self) -> Optional[List[str]]:
method identifiers (line 467) | def identifiers(self, bundle_ids: List[str]) -> None:
method to_dict (line 471) | def to_dict(self) -> dict:
class InstallApplication (line 482) | class InstallApplication(Command):
method __init__ (line 486) | def __init__(self, uuid: Optional[UUID]=None, **kwargs) -> None:
method itunes_store_id (line 498) | def itunes_store_id(self) -> Optional[int]:
method itunes_store_id (line 502) | def itunes_store_id(self, id: int):
method to_dict (line 509) | def to_dict(self) -> dict:
class ManagedApplicationList (line 516) | class ManagedApplicationList(Command):
class RestartDevice (line 521) | class RestartDevice(Command):
class ShutDownDevice (line 527) | class ShutDownDevice(Command):
class EraseDevice (line 533) | class EraseDevice(Command):
class RequestMirroring (line 539) | class RequestMirroring(Command):
class StopMirroring (line 544) | class StopMirroring(Command):
class Restrictions (line 550) | class Restrictions(Command):
class UsersList (line 555) | class UsersList(Command):
class LogOutUser (line 560) | class LogOutUser(Command):
class DeleteUser (line 565) | class DeleteUser(Command):
class EnableLostMode (line 570) | class EnableLostMode(Command):
class DisableLostMode (line 576) | class DisableLostMode(Command):
class DeviceLocation (line 582) | class DeviceLocation(Command):
class PlayLostModeSound (line 588) | class PlayLostModeSound(Command):
class AvailableOSUpdates (line 594) | class AvailableOSUpdates(Command):
class Settings (line 599) | class Settings(Command):
method __init__ (line 604) | def __init__(self,
method to_dict (line 656) | def to_dict(self) -> dict:
FILE: commandment/mdm/decorators.py
function handle_error_status (line 4) | def handle_error_status(func):
FILE: commandment/mdm/handlers.py
function ack_device_information (line 24) | def ack_device_information(request: DBCommand, device: Device, response:...
function ack_security_info (line 46) | def ack_security_info(request: DBCommand, device: Device, response: dict):
function ack_profile_list (line 55) | def ack_profile_list(request: DBCommand, device: Device, response: dict):
function ack_certificate_list (line 136) | def ack_certificate_list(request: DBCommand, device: Device, response: d...
function ack_installed_app_list (line 173) | def ack_installed_app_list(request: DBCommand, device: Device, response:...
function ack_install_profile (line 220) | def ack_install_profile(request: DBCommand, device: Device, response: di...
function ack_install_profile (line 227) | def ack_install_profile(request: DBCommand, device: Device, response: di...
function ack_available_os_updates (line 234) | def ack_available_os_updates(request: DBCommand, device: Device, respons...
function ack_install_application (line 253) | def ack_install_application(request: DBCommand, device: Device, response...
function ack_managed_application_list (line 289) | def ack_managed_application_list(request: DBCommand, device: Device, res...
function ack_restart_device (line 332) | def ack_restart_device(request: DBCommand, device: Device, response: dict):
function ack_restart_device (line 343) | def ack_restart_device(request: DBCommand, device: Device, response: dict):
FILE: commandment/mdm/resources.py
class CommandsList (line 9) | class CommandsList(ResourceList):
method query (line 10) | def query(self, view_kwargs):
class CommandDetail (line 30) | class CommandDetail(ResourceDetail):
class CommandRelationship (line 39) | class CommandRelationship(ResourceRelationship):
FILE: commandment/mdm/response_schema.py
class ErrorChainItem (line 11) | class ErrorChainItem(Schema):
class CommandResponse (line 20) | class CommandResponse(Schema):
class OrganizationInfo (line 28) | class OrganizationInfo(Schema):
class AutoSetupAdminAccount (line 32) | class AutoSetupAdminAccount(Schema):
class OSUpdateSettings (line 37) | class OSUpdateSettings(Schema):
class DeviceInformation (line 51) | class DeviceInformation(Schema):
method normalize_osu (line 115) | def normalize_osu(self, data):
class DeviceInformationResponse (line 122) | class DeviceInformationResponse(CommandResponse):
class InstallApplicationResponse (line 126) | class InstallApplicationResponse(CommandResponse):
class HardwareEncryptionCaps (line 131) | class HardwareEncryptionCaps(IntFlag):
class FirewallApplicationItem (line 139) | class FirewallApplicationItem(Schema):
class FirewallSettings (line 145) | class FirewallSettings(Schema):
class FirmwarePasswordStatus (line 152) | class FirmwarePasswordStatus(Schema):
class ManagementStatus (line 158) | class ManagementStatus(Schema):
class SecurityInfoResponse (line 163) | class SecurityInfoResponse(CommandResponse):
class InstalledApplicationItem (line 180) | class InstalledApplicationItem(Schema):
method make_installed_application (line 197) | def make_installed_application(self, data: Optional[dict]) -> Optional...
class InstalledApplicationListResponse (line 201) | class InstalledApplicationListResponse(CommandResponse):
class CertificateListItem (line 205) | class CertificateListItem(Schema):
method make_installed_certificate (line 211) | def make_installed_certificate(self, data: dict) -> inventory_models.I...
class CertificateListResponse (line 215) | class CertificateListResponse(CommandResponse):
class AvailableOSUpdate (line 219) | class AvailableOSUpdate(Schema):
method make_available_os_update (line 237) | def make_available_os_update(self, data: dict) -> commandment.inventor...
class AvailableOSUpdateListResponse (line 241) | class AvailableOSUpdateListResponse(CommandResponse):
class ProfileListPayloadItem (line 245) | class ProfileListPayloadItem(Schema):
method make_installed_payload (line 255) | def make_installed_payload(self, data: dict) -> inventory_models.Insta...
class ProfileListItem (line 259) | class ProfileListItem(Schema):
method make_installed_profile (line 274) | def make_installed_profile(self, data: dict) -> inventory_models.Insta...
class ProfileListResponse (line 278) | class ProfileListResponse(CommandResponse):
FILE: commandment/mdm/routers.py
class CommandRouter (line 15) | class CommandRouter(object):
method __init__ (line 29) | def __init__(self, app: Union[Flask, Blueprint]) -> None:
method handle (line 33) | def handle(self, command: Command, device: Device, response: dict):
method route (line 41) | def route(self, request_type: str):
class PlistRouter (line 64) | class PlistRouter(object):
method __init__ (line 68) | def __init__(self, app: app, url: str) -> None:
method view (line 73) | def view(self):
method route (line 92) | def route(self, key: str, value: Any):
FILE: commandment/mdm/schema.py
class CommandSchema (line 5) | class CommandSchema(Schema):
class Meta (line 6) | class Meta:
FILE: commandment/mdm/util.py
function queryresponses_to_query_set (line 5) | def queryresponses_to_query_set(responses: dict):
function queue_full_inventory (line 9) | def queue_full_inventory(device: Device):
FILE: commandment/models.py
class CellularTechnology (line 27) | class CellularTechnology(IntEnum):
class Device (line 42) | class Device(db.Model):
method token (line 256) | def token(self):
method token (line 260) | def token(self, value):
method hex_token (line 264) | def hex_token(self):
method unlock_token (line 286) | def unlock_token(self):
method unlock_token (line 290) | def unlock_token(self, value):
method platform (line 297) | def platform(self) -> Platform:
method __repr__ (line 305) | def __repr__(self):
class CommandSequence (line 309) | class CommandSequence(db.Model):
class Command (line 320) | class Command(db.Model):
method from_model (line 364) | def from_model(cls, cmd: commands.Command):
method find_by_uuid (line 382) | def find_by_uuid(cls, uuid: str):
method next_command (line 394) | def next_command(cls, device: Device):
method next (line 415) | def next(cls, device: Device): # type: (Type[Command], Device) -> Opt...
method __repr__ (line 421) | def __repr__(self):
class DeviceUser (line 425) | class DeviceUser(db.Model):
class Organization (line 454) | class Organization(db.Model):
class DeviceIdentitySources (line 484) | class DeviceIdentitySources(Enum):
class SCEPConfig (line 491) | class SCEPConfig(db.Model):
class SubjectAlternativeNameType (line 519) | class SubjectAlternativeNameType(Enum):
class SubjectAlternativeName (line 538) | class SubjectAlternativeName(db.Model):
class Tag (line 552) | class Tag(db.Model):
FILE: commandment/mutablelist.py
class MutableList (line 12) | class MutableList(Mutable, list):
method __setitem__ (line 37) | def __setitem__(self, index, value):
method __setslice__ (line 42) | def __setslice__(self, start, end, value):
method __delitem__ (line 47) | def __delitem__(self, index):
method __delslice__ (line 52) | def __delslice__(self, start, end):
method pop (line 57) | def pop(self, *arg):
method append (line 62) | def append(self, x):
method extend (line 66) | def extend(self, x):
method insert (line 70) | def insert(self, i, x):
method remove (line 74) | def remove(self, i):
method clear (line 78) | def clear(self):
method sort (line 82) | def sort(self):
method reverse (line 86) | def reverse(self):
method coerce (line 91) | def coerce(cls, index, value):
method __getstate__ (line 100) | def __getstate__(self):
method __setstate__ (line 103) | def __setstate__(self, state):
FILE: commandment/omdm/__init__.py
function omdm (line 9) | def omdm():
FILE: commandment/pkg/__init__.py
class ManifestAssetKind (line 4) | class ManifestAssetKind(Enum):
FILE: commandment/pkg/appmanifest.py
function blow_chunks (line 14) | def blow_chunks(fileobj) -> Tuple[str, List[str]]:
function url_from_metadata (line 28) | def url_from_metadata(path: str) -> Optional[str]:
function main (line 56) | def main():
FILE: commandment/pkg/manifest.py
function chunked_hash (line 9) | def chunked_hash(stream: Union[io.RawIOBase, io.BufferedIOBase], chunk_s...
FILE: commandment/pkg/old_app_manifest.py
function pkg_signed (line 19) | def pkg_signed(filename):
function get_pkg_bundle_ids (line 38) | def get_pkg_bundle_ids(filename):
function get_chunked_md5 (line 98) | def get_chunked_md5(filename, chunksize=MD5_CHUNK_SIZE):
FILE: commandment/pkg/schema.py
class Asset (line 4) | class Asset(Schema):
class BundleItem (line 12) | class BundleItem(Schema):
class Metadata (line 17) | class Metadata(Schema):
class ManifestItem (line 27) | class ManifestItem(Schema):
class Manifest (line 32) | class Manifest(Schema):
FILE: commandment/pki/ca.py
function get_ca (line 9) | def get_ca() -> CertificateAuthority:
FILE: commandment/pki/models.py
class CertificateAuthority (line 15) | class CertificateAuthority(db.Model):
method create (line 34) | def create(cls, common_name: str = 'COMMANDMENT-CA', key_size=2048):
method create_device_csr (line 75) | def create_device_csr(self, common_name: str) -> (rsa.RSAPrivateKeyWit...
method sign (line 120) | def sign(self, request: x509.CertificateSigningRequest) -> x509.Certif...
class CertificateType (line 166) | class CertificateType(Enum):
class Certificate (line 181) | class Certificate(db.Model):
method from_crypto_type (line 238) | def from_crypto_type(cls, certificate: x509.Certificate, certtype: Cer...
class RSAPrivateKey (line 257) | class RSAPrivateKey(db.Model):
method from_crypto (line 266) | def from_crypto(cls, private_key: rsa.RSAPrivateKeyWithSerialization):
method to_crypto (line 278) | def to_crypto(self) -> rsa.RSAPrivateKey:
class CertificateSigningRequest (line 288) | class CertificateSigningRequest(Certificate):
method from_crypto (line 295) | def from_crypto(cls, csr: x509.CertificateSigningRequest):
class SSLCertificate (line 315) | class SSLCertificate(Certificate):
class PushCertificate (line 322) | class PushCertificate(Certificate):
method from_crypto (line 329) | def from_crypto(cls, certificate: x509.Certificate):
class CACertificate (line 334) | class CACertificate(Certificate):
method from_crypto (line 341) | def from_crypto(cls, certificate: x509.Certificate): # type: () -> CA...
class DeviceIdentityCertificate (line 346) | class DeviceIdentityCertificate(Certificate):
method from_crypto (line 353) | def from_crypto(cls, certificate: x509.Certificate):
class EncryptionCertificate (line 375) | class EncryptionCertificate(Certificate):
method from_crypto (line 382) | def from_crypto(cls, certificate: x509.Certificate):
FILE: commandment/pki/openssl.py
function create_pkcs12 (line 9) | def create_pkcs12(
FILE: commandment/pki/ormutils.py
function find_recipient (line 8) | def find_recipient(cms_data: bytes) -> Optional[Certificate]:
FILE: commandment/pki/serialization.py
function from_pem (line 11) | def from_pem(pem_data: str) -> x509.Certificate:
function from_der (line 15) | def from_der(der_data: bytes) -> x509.Certificate:
function rsa_from_der (line 19) | def rsa_from_der(rsa_der_data: bytes, password: str = None) -> rsa.RSAPr...
function rsa_from_pem (line 27) | def rsa_from_pem(rsa_pem_data: bytes, password: str = None) -> rsa.RSAPr...
function rsa_to_pem (line 35) | def rsa_to_pem(key: rsa.RSAPrivateKeyWithSerialization) -> str:
function to_pem (line 43) | def to_pem(certificate: x509.Certificate) -> str:
function to_der (line 58) | def to_der(certificate: x509.Certificate) -> bytes:
FILE: commandment/pki/ssl.py
function generate_signing_request (line 10) | def generate_signing_request(cn: str, dnsname: Optional[str] = None) -> ...
function generate_self_signed_certificate (line 50) | def generate_self_signed_certificate(cn: str) -> (rsa.RSAPrivateKey, x50...
FILE: commandment/plistutil/nonewriter.py
class PlistNoneWriter (line 5) | class PlistNoneWriter(_PlistWriter):
method write_dict (line 9) | def write_dict(self, d):
function dump (line 36) | def dump(value, fp, *, fmt=FMT_XML, sort_keys=True, skipkeys=False):
function dumps (line 47) | def dumps(value, *, fmt=FMT_XML, skipkeys=False, sort_keys=True):
FILE: commandment/profiles/__init__.py
class PayloadScope (line 10) | class PayloadScope(Enum):
FILE: commandment/profiles/ad.py
class ADMountStyle (line 5) | class ADMountStyle(Enum):
class ADNamespace (line 10) | class ADNamespace(Enum):
class ADOption (line 15) | class ADOption(Flag):
class ADPacketSignPolicy (line 25) | class ADPacketSignPolicy(Enum):
class ADPacketEncryptPolicy (line 31) | class ADPacketEncryptPolicy(Enum):
class ADCertificateAcquisitionMechanism (line 38) | class ADCertificateAcquisitionMechanism(Enum):
FILE: commandment/profiles/certificates.py
class KeyUsage (line 10) | class KeyUsage(IntFlag):
FILE: commandment/profiles/eap.py
class EAPTypes (line 5) | class EAPTypes(IntEnum):
class TTLSInnerAuthentication (line 33) | class TTLSInnerAuthentication(Enum):
FILE: commandment/profiles/email.py
class EmailAccountType (line 3) | class EmailAccountType(Enum):
class EmailAuthenticationType (line 8) | class EmailAuthenticationType(Enum):
FILE: commandment/profiles/energy.py
class ScheduledPowerEventType (line 4) | class ScheduledPowerEventType(Enum):
class ScheduledPowerEventWeekdays (line 12) | class ScheduledPowerEventWeekdays(IntFlag):
method _generate_next_value_ (line 13) | def _generate_next_value_(name, start, count, last_values):
FILE: commandment/profiles/models.py
class Payload (line 9) | class Payload(db.Model):
class MDMPayload (line 33) | class MDMPayload(Payload):
class SCEPPayload (line 50) | class SCEPPayload(Payload):
class CertificatePayload (line 70) | class CertificatePayload(Payload):
class PEMCertificatePayload (line 80) | class PEMCertificatePayload(CertificatePayload):
class DERCertificatePayload (line 86) | class DERCertificatePayload(CertificatePayload):
class PKCS12CertificatePayload (line 92) | class PKCS12CertificatePayload(CertificatePayload):
class Profile (line 109) | class Profile(db.Model):
FILE: commandment/profiles/plist_schema.py
function schema_for (line 17) | def schema_for(payload_type: str) -> Union[None, Type[Schema]]:
function register_payload_schema (line 28) | def register_payload_schema(*args) -> Callable[[Type[Schema]], Type[Sche...
class Payload (line 38) | class Payload(Schema):
class ProfileServicePayload (line 49) | class ProfileServicePayload(Schema):
class ConsentTextSchema (line 55) | class ConsentTextSchema(Schema):
class CertificatePayloadSchema (line 61) | class CertificatePayloadSchema(Payload):
class SCEPPayload (line 69) | class SCEPPayload(Payload):
method wrap_payload_content (line 83) | def wrap_payload_content(self, data: dict) -> dict:
method make_payload (line 101) | def make_payload(self, data: dict) -> models.SCEPPayload:
class MDMPayload (line 106) | class MDMPayload(Payload):
method make_payload (line 118) | def make_payload(self, data: dict) -> models.MDMPayload:
class ProfileSchema (line 123) | class ProfileSchema(Schema):
method get_payloads (line 139) | def get_payloads(self, obj):
method load_payloads (line 152) | def load_payloads(self, payload_content: list) -> List[Schema]:
method make_profile (line 167) | def make_profile(self, data):
FILE: commandment/profiles/resources.py
class ProfilesList (line 7) | class ProfilesList(ResourceList):
class ProfileDetail (line 15) | class ProfileDetail(ResourceDetail):
class ProfileRelationship (line 24) | class ProfileRelationship(ResourceRelationship):
FILE: commandment/profiles/schema.py
class ProfileSchema (line 6) | class ProfileSchema(Schema):
class Meta (line 7) | class Meta:
FILE: commandment/profiles/vpn.py
class VPNType (line 3) | class VPNType(Enum):
FILE: commandment/profiles/wifi.py
class WIFIEncryptionType (line 4) | class WIFIEncryptionType(Enum):
class WIFIProxyType (line 12) | class WIFIProxyType(Enum):
FILE: commandment/threads/startup_thread.py
function generate_ca (line 29) | def generate_ca(app: Flask):
function split_pkcs12 (line 36) | def split_pkcs12(app: Flask):
function run_migrations (line 80) | def run_migrations(app: Flask):
function startup_callback (line 89) | def startup_callback(app: Flask):
function start (line 97) | def start(app: Flask):
FILE: commandment/utils.py
function plistify (line 5) | def plistify(*args, **kwargs):
FILE: commandment/vpp/__init__.py
function get_vpp (line 7) | def get_vpp() -> VPP:
FILE: commandment/vpp/app.py
function token (line 11) | def token():
function upload_token (line 28) | def upload_token():
FILE: commandment/vpp/decorators.py
function raise_error_replies (line 6) | def raise_error_replies(f):
FILE: commandment/vpp/enum.py
class VPPPricingParam (line 5) | class VPPPricingParam(Enum):
class VPPUserStatus (line 14) | class VPPUserStatus(Enum):
class LicenseAssociationType (line 32) | class LicenseAssociationType(Enum):
class LicenseDisassociationType (line 43) | class LicenseDisassociationType(Enum):
class VPPProductType (line 58) | class VPPProductType(IntEnum):
FILE: commandment/vpp/errors.py
class VPPErrorType (line 4) | class VPPErrorType(IntEnum):
class VPPError (line 47) | class VPPError(Exception):
class VPPAPIError (line 52) | class VPPAPIError(VPPError):
method __init__ (line 59) | def __init__(self, errno, message):
FILE: commandment/vpp/models.py
class VPPAccount (line 11) | class VPPAccount(db.Model):
method stoken (line 17) | def stoken(self) -> str:
method stoken (line 21) | def stoken(self, value: str):
class VPPUser (line 46) | class VPPUser(db.Model):
class VPPLicense (line 57) | class VPPLicense(db.Model):
FILE: commandment/vpp/schema.py
class VPPAccountSchema (line 4) | class VPPAccountSchema(Schema):
FILE: commandment/vpp/vpp.py
function encode_stoken (line 24) | def encode_stoken(token: dict) -> bytes:
class VPPCursor (line 36) | class VPPCursor(object):
method batch_count (line 45) | def batch_count(self) -> Optional[int]:
method total (line 50) | def total(self) -> Optional[int]:
method batch_token (line 55) | def batch_token(self) -> Optional[str]:
method since_modified_token (line 60) | def since_modified_token(self) -> Optional[str]:
method __init__ (line 65) | def __init__(self, since_modified_token: str = None, vpp=None) -> None:
class VPPUserCursor (line 73) | class VPPUserCursor(VPPCursor):
method users (line 81) | def users(self) -> Optional[List[dict]]:
method __init__ (line 85) | def __init__(self, includes_retired: bool = True, vpp=None) -> None:
method next (line 89) | def next(self):
class VPPLicenseCursor (line 104) | class VPPLicenseCursor(VPPCursor):
method licenses (line 110) | def licenses(self) -> Optional[List[dict]]:
method __init__ (line 115) | def __init__(self, *args, **kwargs) -> None:
method next (line 118) | def next(self):
class VPPLicenseOperation (line 132) | class VPPLicenseOperation(object):
method adam_id (line 144) | def adam_id(self) -> int:
method pricing_param (line 148) | def pricing_param(self) -> str:
method associations (line 152) | def associations(self) -> Tuple[LicenseAssociationType, List[LicenseAs...
method disassociations (line 156) | def disassociations(self) -> Tuple[LicenseDisassociationType, List[Lic...
method __init__ (line 159) | def __init__(self, adam_id: int, pricing_param: str = 'STDQ',
method add (line 169) | def add(self, association_type: LicenseAssociationType, value: str):
method additions_for_type (line 177) | def additions_for_type(self, association_type: LicenseAssociationType)...
method remove (line 180) | def remove(self, disassociation_type: LicenseDisassociationType, value...
method removals_for_type (line 188) | def removals_for_type(self, disassociation_type: LicenseDisassociation...
class VPPUserLicenseOperation (line 192) | class VPPUserLicenseOperation(VPPLicenseOperation):
method __init__ (line 201) | def __init__(self, *args, **kwargs) -> None:
class VPPDeviceLicenseOperation (line 207) | class VPPDeviceLicenseOperation(VPPLicenseOperation):
method __init__ (line 216) | def __init__(self, *args, **kwargs) -> None:
class VPP (line 222) | class VPP(object):
method __init__ (line 244) | def __init__(self, stoken: str, vpp_service_config_url: str = SERVICE_...
method _fetch_config (line 264) | def _fetch_config(self, service_config_url: str) -> dict:
method register_user (line 274) | def register_user(self, client_user_id: str, email: str = None, facili...
method get_user (line 307) | def get_user(self, client_user_id: str = None, its_id_hash: str = None...
method users (line 333) | def users(self, include_retired: int = 1, facilitator_member_id: str =...
method retire_user (line 364) | def retire_user(self, client_user_id: str = None, facilitator_member_i...
method edit_user (line 388) | def edit_user(self, client_user_id: str = None, facilitator_member_id:...
method assets (line 421) | def assets(self, include_license_counts: bool = True, facilitator_memb...
method manage (line 440) | def manage(self, adam_id: int, pricing_param: str = 'STDQ') -> VPPLice...
method manage_user_licenses (line 456) | def manage_user_licenses(self, adam_id: int, pricing_param: str = 'STD...
method manage_device_licenses (line 472) | def manage_device_licenses(self, adam_id: int, pricing_param: str = 'S...
method licenses (line 488) | def licenses(self,
method save (line 532) | def save(self, operation: VPPLicenseOperation, notify: bool = False) -...
method bulk_update_licenses (line 560) | def bulk_update_licenses(self,
FILE: tests/api/conftest.py
function device (line 12) | def device(session: Session):
FILE: tests/api/test_devices.py
class TestDevicesAPI (line 11) | class TestDevicesAPI:
method test_patch_device_name (line 13) | def test_patch_device_name(self, client: MDMClient, session):
method test_patch_hostname (line 41) | def test_patch_hostname(self, client: MDMClient, session):
method test_patch_hostname_ios (line 68) | def test_patch_hostname_ios(self):
method test_patch_device_name_reverted (line 73) | def test_patch_device_name_reverted(self, client: MDMClient, session):
method test_patch_device_name_coalesced (line 113) | def test_patch_device_name_coalesced(self, client: MDMClient, session):
FILE: tests/client.py
class MDMClient (line 4) | class MDMClient(FlaskClient):
method __init__ (line 13) | def __init__(self, *args, **kwargs):
FILE: tests/conftest.py
function app (line 24) | def app() -> Generator[Flask, None, None]:
function db (line 39) | def db(app: Flask) -> Generator[SQLAlchemy, None, None]:
function session (line 48) | def session(db: SQLAlchemy) -> Generator[scoped_session, None, None]:
function client (line 78) | def client(app: Flask) -> MDMClient:
FILE: tests/dep/conftest.py
function simulator_token (line 15) | def simulator_token() -> dict:
function live_token (line 21) | def live_token() -> str:
function live_device (line 30) | def live_device() -> str:
function live_dep_profile (line 35) | def live_dep_profile() -> str:
function dep (line 40) | def dep(simulator_token: dict) -> DEP:
function dep_live (line 53) | def dep_live(live_token: str):
function dep_profile (line 58) | def dep_profile() -> dict:
function dep_profile_committed (line 82) | def dep_profile_committed(dep_profile: dict, session: Session):
function device (line 89) | def device(session: Session):
FILE: tests/dep/test_dep.py
class TestDEP (line 6) | class TestDEP:
method test_account (line 7) | def test_account(self, dep: DEP):
method test_fetch_devices (line 12) | def test_fetch_devices(self, dep: DEP):
method test_fetch_cursor (line 21) | def test_fetch_cursor(self, dep: DEP):
FILE: tests/dep/test_dep_app.py
class TestDEPAPI (line 14) | class TestDEPAPI:
method test_post_dep_profile_relationship (line 16) | def test_post_dep_profile_relationship(self, client: MDMClient, session):
FILE: tests/dep/test_dep_failures.py
class TestDEPFailures (line 6) | class TestDEPFailures:
method test_token_failure (line 16) | def test_token_failure(self, dep: DEP, expected_status: int, expected_...
method test_account_failure (line 27) | def test_account_failure(self, dep: DEP, expected_status: int, expecte...
FILE: tests/dep/test_dep_live.py
class TestDEPLive (line 6) | class TestDEPLive:
method test_account (line 7) | def test_account(self, dep_live: DEP):
method test_fetch_devices (line 26) | def test_fetch_devices(self, dep_live: DEP):
method test_device_details (line 34) | def test_device_details(self, dep_live: DEP, live_device: str):
method test_get_profile (line 54) | def test_get_profile(self, dep_live: DEP, live_dep_profile: str):
FILE: tests/dep/test_smime.py
class TestDepSmime (line 13) | class TestDepSmime:
method test_decrypt (line 14) | def test_decrypt(self):
FILE: tests/mdm/conftest.py
function device (line 12) | def device(session: Session):
function authenticate_request (line 23) | def authenticate_request() -> str:
function tokenupdate_request (line 31) | def tokenupdate_request() -> str:
function tokenupdate_user_request (line 39) | def tokenupdate_user_request() -> str:
function checkout_request (line 47) | def checkout_request() -> str:
function available_os_updates_request (line 55) | def available_os_updates_request() -> str:
FILE: tests/mdm/test_available_os_updates.py
function available_os_updates_command (line 13) | def available_os_updates_command(session):
class TestAvailableOSUpdates (line 27) | class TestAvailableOSUpdates:
method test_available_os_updates_response (line 29) | def test_available_os_updates_response(self, client: MDMClient, availa...
FILE: tests/mdm/test_certificate_list.py
function certificate_list_response (line 12) | def certificate_list_response():
function certificate_list_command (line 20) | def certificate_list_command(session):
class TestCertificateList (line 32) | class TestCertificateList:
method test_certificate_list_response (line 34) | def test_certificate_list_response(self, client: MDMClient, certificat...
FILE: tests/mdm/test_checkin.py
class TestCheckin (line 7) | class TestCheckin:
method test_authenticate (line 9) | def test_authenticate(self, client: MDMClient, authenticate_request: s...
method test_tokenupdate (line 15) | def test_tokenupdate(self, client: MDMClient, tokenupdate_request: str):
method test_checkout (line 27) | def test_checkout(self, client: MDMClient, checkout_request: str):
FILE: tests/mdm/test_device_information.py
function device_information_response (line 10) | def device_information_response():
class TestDeviceInformation (line 18) | class TestDeviceInformation:
method test_device_information_response (line 20) | def test_device_information_response(self, client: MDMClient, device_i...
FILE: tests/mdm/test_installed_application_list.py
function installed_application_list_response (line 12) | def installed_application_list_response():
function installed_application_list_command (line 20) | def installed_application_list_command(session):
class TestInstalledApplicationList (line 32) | class TestInstalledApplicationList:
method test_installed_application_list_response (line 34) | def test_installed_application_list_response(self, client: MDMClient, ...
FILE: tests/mdm/test_profile_list.py
function profile_list_response (line 11) | def profile_list_response() -> str:
class TestProfileList (line 19) | class TestProfileList:
method test_profile_list_response (line 21) | def test_profile_list_response(self, client: MDMClient, profile_list_r...
FILE: tests/mdm/test_security_info.py
function security_info_response (line 13) | def security_info_response():
function security_info_command (line 21) | def security_info_command(session):
class TestSecurityInfo (line 33) | class TestSecurityInfo:
method test_security_info_response (line 35) | def test_security_info_response(self, client: MDMClient, security_info...
FILE: tests/pki/conftest.py
function private_key (line 11) | def private_key() -> rsa.RSAPrivateKey:
function csr (line 21) | def csr(private_key: rsa.RSAPrivateKey) -> x509.CertificateSigningRequest:
function certificate (line 35) | def certificate(private_key: rsa.RSAPrivateKey) -> x509.Certificate:
function ca_certificate (line 59) | def ca_certificate(private_key: rsa.RSAPrivateKey) -> x509.Certificate:
FILE: tests/pki/test_models.py
class TestModels (line 11) | class TestModels:
method test_rsa_privatekey_from_crypto (line 13) | def test_rsa_privatekey_from_crypto(self, private_key: rsa.RSAPrivateK...
method test_ca_certificate_from_crypto (line 21) | def test_ca_certificate_from_crypto(self, ca_certificate: x509.Certifi...
FILE: tests/pki/test_openssl.py
class TestOpenssl (line 12) | class TestOpenssl:
method test_pkcs12_from_crypto (line 14) | def test_pkcs12_from_crypto(self, private_key: rsa.RSAPrivateKeyWithSe...
FILE: tests/pki/test_ormutils.py
class TestORMUtils (line 12) | class TestORMUtils:
method test_find_recipient (line 14) | def test_find_recipient(self, certificate):
FILE: tests/test_api_flat.py
class TestApiCertificates (line 10) | class TestApiCertificates:
FILE: tests/test_mdmcert.py
function private_key (line 16) | def private_key() -> rsa.RSAPrivateKey:
function csr (line 26) | def csr(private_key: rsa.RSAPrivateKey) -> x509.CertificateSigningRequest:
function encryption_cert (line 40) | def encryption_cert() -> x509.Certificate:
FILE: tests/threads/test_startup_thread.py
class TestStartupThread (line 6) | class TestStartupThread:
method test_startup_thread_ca (line 8) | def test_startup_thread_ca(self, session):
FILE: tests/vpp/conftest.py
function simulator_token (line 30) | def simulator_token() -> str:
function vpp (line 36) | def vpp(simulator_token: str) -> VPP:
FILE: tests/vpp/vpp_test.py
class TestVPP (line 17) | class TestVPP:
method test_vpp_register_user (line 22) | def test_vpp_register_user(self, vpp: VPP):
method test_getuser_by_client_id (line 27) | def test_getuser_by_client_id(self, vpp: VPP):
method test_getuser_by_user_id (line 35) | def test_getuser_by_user_id(self, vpp: VPP):
method test_retireuser_by_client_id (line 40) | def test_retireuser_by_client_id(self, vpp: VPP):
method test_edit_user_by_client_id (line 52) | def test_edit_user_by_client_id(self, vpp: VPP):
method test_get_assets (line 57) | def test_get_assets(self, vpp: VPP):
method test_users (line 65) | def test_users(self, vpp: VPP):
method test_licenses (line 73) | def test_licenses(self, vpp: VPP):
method test_manage_one_license (line 85) | def test_manage_one_license(self, vpp: VPP):
FILE: ui/.storybook/config.js
function loadStories (line 5) | function loadStories() {
FILE: ui/_deprecated/AssistantPage.tsx
type AssistantPageStateProps (line 16) | interface AssistantPageStateProps {
type AssistantPageDispatchProps (line 20) | interface AssistantPageDispatchProps {
type OwnProps (line 26) | interface OwnProps {
type AssistantPageProps (line 30) | interface AssistantPageProps extends AssistantPageDispatchProps, Assista...
class AssistantPage (line 46) | class AssistantPage extends React.Component<AssistantPageProps, undefine...
method render (line 53) | render() {
FILE: ui/_deprecated/DeviceGroupPage.tsx
type RouteProps (line 20) | interface RouteProps {
type OwnProps (line 24) | interface OwnProps extends RouteComponentProps<RouteProps> {
type ReduxStateProps (line 28) | interface ReduxStateProps {
function mapStateToProps (line 32) | function mapStateToProps(state: RootState, ownProps?: OwnProps): ReduxSt...
type ReduxDispatchProps (line 38) | interface ReduxDispatchProps {
function mapDispatchToProps (line 43) | function mapDispatchToProps(dispatch: Dispatch<RootState>, ownProps?: Ow...
class BaseDeviceGroupPage (line 51) | class BaseDeviceGroupPage extends React.Component<ReduxStateProps & Redu...
method componentWillMount (line 53) | componentWillMount?() {
method render (line 67) | render() {
FILE: ui/_deprecated/DeviceGroupsPage.tsx
type ReduxStateProps (line 22) | interface ReduxStateProps {
function mapStateToProps (line 26) | function mapStateToProps(state: RootState, ownProps?: any): ReduxStatePr...
type ReduxDispatchProps (line 32) | interface ReduxDispatchProps {
function mapDispatchToProps (line 36) | function mapDispatchToProps(dispatch: Dispatch<RootState>): ReduxDispatc...
type DeviceGroupsPageProps (line 42) | interface DeviceGroupsPageProps extends ReduxStateProps, ReduxDispatchPr...
type DeviceGroupsPageState (line 47) | interface DeviceGroupsPageState {
class UnconnectedDeviceGroupsPage (line 51) | class UnconnectedDeviceGroupsPage extends React.Component<DeviceGroupsPa...
method componentWillMount (line 53) | componentWillMount?() {
method render (line 57) | render() {
FILE: ui/_deprecated/InternalCAPage.tsx
type CAPageState (line 14) | interface CAPageState {
type CAPageDispatchProps (line 18) | interface CAPageDispatchProps {
type CAPageProps (line 23) | interface CAPageProps extends CAPageState, CAPageDispatchProps, RouteCom...
class InternalCAPage (line 38) | class InternalCAPage extends React.Component<CAPageProps, undefined> {
method componentWillMount (line 40) | componentWillMount?() {
method render (line 56) | render(): JSX.Element {
FILE: ui/_deprecated/MDMPage.tsx
type MDMPageState (line 11) | interface MDMPageState {
type MDMPageDispatchProps (line 15) | interface MDMPageDispatchProps {
type MDMPageProps (line 19) | interface MDMPageProps extends MDMPageState, MDMPageDispatchProps, Route...
class MDMPage (line 33) | class MDMPage extends React.Component<MDMPageProps & RouteComponentProps...
method componentWillMount (line 35) | componentWillMount?(): void {
method render (line 44) | render() {
FILE: ui/_deprecated/SCEPConfigurationForm.tsx
type FormData (line 7) | interface FormData {
type SCEPConfigurationFormProps (line 15) | interface SCEPConfigurationFormProps extends FormProps<FormData, any, an...
class SCEPConfigurationForm (line 22) | class SCEPConfigurationForm extends React.Component<SCEPConfigurationFor...
method render (line 23) | render() {
FILE: ui/_deprecated/SSLPage.tsx
type SSLPageState (line 18) | interface SSLPageState {
type SSLPageDispatchProps (line 23) | interface SSLPageDispatchProps {
type SSLPageProps (line 30) | interface SSLPageProps extends SSLPageState, SSLPageDispatchProps, Route...
class SSLPage (line 48) | class SSLPage extends React.Component<SSLPageProps, undefined> {
method componentWillMount (line 50) | componentWillMount?() {
method render (line 63) | render(): JSX.Element {
FILE: ui/_deprecated/assistant/APNSConfiguration.tsx
type APNSConfigurationProps (line 5) | interface APNSConfigurationProps {
class APNSConfiguration (line 9) | class APNSConfiguration extends React.Component<APNSConfigurationProps,u...
method render (line 27) | render(): JSX.Element {
FILE: ui/_deprecated/assistant/FinalStep.tsx
type FinalStepProps (line 3) | interface FinalStepProps {
class FinalStep (line 7) | class FinalStep extends React.Component<FinalStepProps,undefined> {
method render (line 9) | render() {
FILE: ui/_deprecated/assistant/SCEPConfiguration.tsx
type SCEPConfigurationProps (line 4) | interface SCEPConfigurationProps {
class SCEPConfiguration (line 8) | class SCEPConfiguration extends React.Component<SCEPConfigurationProps,u...
method render (line 19) | render() {
FILE: ui/_deprecated/assistant/SSLConfiguration.tsx
type SSLConfigurationProps (line 4) | interface SSLConfigurationProps {
class SSLConfiguration (line 9) | class SSLConfiguration extends React.Component<SSLConfigurationProps,und...
method render (line 24) | render() {
FILE: ui/src/@types/byte-size/index.d.ts
type Options (line 7) | interface Options {
type ByteSize (line 12) | interface ByteSize {
FILE: ui/src/@types/redux-api-middleware/index.d.ts
type RSAA (line 11) | type RSAA = "@@redux-api-middleware/RSAA";
type ErrorNames (line 15) | enum ErrorNames {
class InvalidRSAA (line 29) | class InvalidRSAA extends Error {
class InternalError (line 44) | class InternalError extends Error {
class RequestError (line 58) | class RequestError extends Error {
class ApiError (line 75) | class ApiError<R = any> extends Error {
type TypeDescriptor (line 99) | interface TypeDescriptor<TSymbol, TPayload = any, TMeta = any> {
type MiddlewareOptions (line 123) | interface MiddlewareOptions {
type RSAActionTypeTuple (line 146) | type RSAActionTypeTuple = [string | symbol, string | symbol, string | sy...
type HTTPVerb (line 154) | type HTTPVerb = "GET" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE" | "...
type RSAActionBody (line 156) | interface RSAActionBody<R, S, F> {
type Credentials (line 166) | enum Credentials {
type RSAAActionType (line 172) | type RSAAActionType = string | TypeDescriptor<any>;
type RSAAActionTypes (line 173) | type RSAAActionTypes = [RSAAActionType, RSAAActionType, RSAAActionType];
type RSAAction (line 175) | interface RSAAction<TRequest, TSuccess, TFail> {
type AnyAction (line 193) | interface AnyAction {
FILE: ui/src/components/ActionMenu.tsx
type UIActionTypes (line 4) | enum UIActionTypes {
type IActionMenu (line 10) | interface IActionMenu {
FILE: ui/src/components/App.tsx
class AppCool (line 14) | class AppCool extends React.Component<{}, {}> {
method render (line 15) | public render() {
FILE: ui/src/components/BareLayout.tsx
type INavigationLayout (line 7) | interface INavigationLayout {
FILE: ui/src/components/CertificateTypeIcon.tsx
type CertificateTypeIconProps (line 4) | interface CertificateTypeIconProps {
FILE: ui/src/components/CheckListItem.tsx
type ICheckListItemProps (line 4) | interface ICheckListItemProps {
FILE: ui/src/components/DeviceActions.tsx
type DeviceActionsProps (line 3) | interface DeviceActionsProps {
FILE: ui/src/components/Navigation.tsx
type INavigationProps (line 7) | interface INavigationProps {
FILE: ui/src/components/NavigationVertical.tsx
type IRouteProps (line 8) | interface IRouteProps {
type INavigationVerticalProps (line 11) | interface INavigationVerticalProps extends RouteComponentProps<IRoutePro...
FILE: ui/src/components/ProtectedRoute.tsx
type IProtectedRoute (line 7) | interface IProtectedRoute {
FILE: ui/src/components/RSAAApiErrorMessage.tsx
type IRSAAApiErrorMessageProps (line 6) | interface IRSAAApiErrorMessageProps {
FILE: ui/src/components/SearchInput.tsx
type ISearchInputProps (line 5) | interface ISearchInputProps {
type ISearchInputState (line 11) | interface ISearchInputState {
class SearchInput (line 16) | class SearchInput extends React.Component<ISearchInputProps, ISearchInpu...
method constructor (line 22) | constructor(props: ISearchInputProps) {
method render (line 27) | public render() {
FILE: ui/src/components/TagDropdown.tsx
type IDropdownOnSearchChangeData (line 9) | interface IDropdownOnSearchChangeData extends DropdownProps {
type ITagDropdownProps (line 13) | interface ITagDropdownProps {
type ITagDropdownState (line 23) | interface ITagDropdownState {
class TagDropdown (line 27) | class TagDropdown extends React.Component<ITagDropdownProps, ITagDropdow...
method constructor (line 31) | constructor(props: ITagDropdownProps) {
method render (line 38) | public render() {
FILE: ui/src/components/devices/DEPDeviceDetail.tsx
type IDEPDeviceDetailProps (line 14) | interface IDEPDeviceDetailProps {
FILE: ui/src/components/devices/IOSDeviceDetail.tsx
type IIOSDeviceDetailProps (line 41) | interface IIOSDeviceDetailProps {
FILE: ui/src/components/devices/MacOSDeviceDetail.tsx
type IMacOSDeviceDetailProps (line 40) | interface IMacOSDeviceDetailProps {
FILE: ui/src/components/devices/ModelIcon.tsx
type IModelIconProps (line 5) | interface IModelIconProps {
FILE: ui/src/components/errors/ApiError.tsx
type IApiErrorProps (line 5) | interface IApiErrorProps {
FILE: ui/src/components/formik/FormikCheckbox.tsx
type IFormikCheckbox (line 5) | type IFormikCheckbox = FieldConfig & CheckboxProps;
FILE: ui/src/components/forms/DEPAccountForm.tsx
class DEPAccountForm (line 4) | class DEPAccountForm extends React.Component {
method render (line 5) | render() {
FILE: ui/src/components/forms/DEPProfileForm.tsx
type IDEPProfileFormValues (line 21) | interface IDEPProfileFormValues {
type IDEPProfileFormProps (line 45) | interface IDEPProfileFormProps {
type IDEPProfileFormState (line 54) | interface IDEPProfileFormState {
type DEPProfilePairWithOptions (line 58) | enum DEPProfilePairWithOptions {
type IInnerFormProps (line 110) | interface IInnerFormProps {
FILE: ui/src/components/forms/DeviceAuthForm.tsx
type IDeviceAuthFormValues (line 23) | interface IDeviceAuthFormValues extends SCEPConfiguration {
type IDeviceAuthFormProps (line 27) | interface IDeviceAuthFormProps {
FILE: ui/src/components/forms/OrganizationForm.tsx
type IOrganizationFormProps (line 16) | interface IOrganizationFormProps {
type IOrganizationFormValues (line 23) | interface IOrganizationFormValues extends Organization {
FILE: ui/src/components/itunes/MASResult.tsx
type IMASResultProps (line 6) | interface IMASResultProps {
FILE: ui/src/components/modals/DeviceRenameModal.tsx
type IDeviceRenameModalProps (line 8) | interface IDeviceRenameModalProps extends RouteComponentProps<any> {
FILE: ui/src/components/modals/ProfileUploadModal.tsx
type IProfileUploadModalProps (line 7) | interface IProfileUploadModalProps extends RouteComponentProps<any> {
FILE: ui/src/components/react-table/SUISelectionTools.tsx
type ISUISelectionTools (line 7) | interface ISUISelectionTools {
FILE: ui/src/components/react-tables/AppDeployStatusTable.tsx
type IAppDeployStatusTableProps (line 7) | interface IAppDeployStatusTableProps {
FILE: ui/src/components/react-tables/ApplicationsTable.tsx
type IApplicationsTableProps (line 11) | interface IApplicationsTableProps {
FILE: ui/src/components/react-tables/DEPAccountsTable.tsx
type IDEPAccountsTableProps (line 10) | interface IDEPAccountsTableProps {
FILE: ui/src/components/react-tables/DEPProfilesTable.tsx
type IDEPProfilesTableProps (line 9) | interface IDEPProfilesTableProps {
FILE: ui/src/components/react-tables/DeviceApplicationsTable.tsx
type IDeviceApplicationsTableProps (line 9) | interface IDeviceApplicationsTableProps {
FILE: ui/src/components/react-tables/DeviceCertificatesTable.tsx
type IDeviceCertificateTableProps (line 8) | interface IDeviceCertificateTableProps {
FILE: ui/src/components/react-tables/DeviceCommandsTable.tsx
type IDeviceCommandsTableProps (line 9) | interface IDeviceCommandsTableProps {
FILE: ui/src/components/react-tables/DeviceProfilesTable.tsx
type IDeviceProfilesTableProps (line 7) | interface IDeviceProfilesTableProps {
FILE: ui/src/components/react-tables/DeviceUpdatesTable.tsx
type IDeviceUpdatesTableProps (line 6) | interface IDeviceUpdatesTableProps extends Partial<TableProps> {
FILE: ui/src/components/react-tables/DevicesTable.tsx
type IDevicesTableProps (line 12) | interface IDevicesTableProps {
FILE: ui/src/components/react-tables/ProfilesTable.tsx
type IProfilesTableProps (line 12) | interface IProfilesTableProps {
FILE: ui/src/components/semantic-ui/ButtonLink.tsx
type IButtonLinkProps (line 5) | interface IButtonLinkProps extends ButtonProps {
FILE: ui/src/components/semantic-ui/MenuItemLink.tsx
type IMenuItemLinkProps (line 5) | interface IMenuItemLinkProps {
FILE: ui/src/components/vpp/VPPAccountDetail.tsx
type IVPPAccountDetailProps (line 13) | interface IVPPAccountDetailProps extends VPPAccount {
FILE: ui/src/constants.ts
constant CERTIFICATE_PURPOSE (line 1) | const CERTIFICATE_PURPOSE: {[propName: string]: string} = {
FILE: ui/src/containers/AppStorePage.tsx
type IRouteProps (line 37) | interface IRouteProps {
type IDispatchProps (line 41) | interface IDispatchProps {
type IStateProps (line 48) | interface IStateProps {
type AppStorePageProps (line 55) | type AppStorePageProps = IDispatchProps & IStateProps & RouteComponentPr...
class UnconnectedAppStorePage (line 57) | class UnconnectedAppStorePage extends React.Component<AppStorePageProps,...
method render (line 58) | public render() {
FILE: ui/src/containers/ApplicationPage.tsx
type IRouteProps (line 30) | interface IRouteProps {
type IDispatchProps (line 34) | interface IDispatchProps {
type IStateProps (line 40) | interface IStateProps {
class UnconnectedApplicationPage (line 45) | class UnconnectedApplicationPage extends React.Component<IDispatchProps ...
method componentWillMount (line 47) | public componentWillMount?() {
method render (line 54) | public render() {
FILE: ui/src/containers/ApplicationsPage.tsx
type IDispatchProps (line 22) | interface IDispatchProps {
type IStateProps (line 26) | interface IStateProps {
type ApplicationsPageProps (line 30) | type ApplicationsPageProps = IDispatchProps & IStateProps & RouteCompone...
class UnconnectedApplicationsPage (line 32) | class UnconnectedApplicationsPage extends React.Component<ApplicationsPa...
method render (line 33) | public render() {
FILE: ui/src/containers/DEPAccountPage.tsx
type IReduxStateProps (line 25) | interface IReduxStateProps {
type IReduxDispatchProps (line 29) | interface IReduxDispatchProps {
type IRouteParameters (line 33) | interface IRouteParameters {
type IDEPAccountPageProps (line 37) | interface IDEPAccountPageProps extends IReduxStateProps, IReduxDispatchP...
class UnconnectedDEPAccountPage (line 41) | class UnconnectedDEPAccountPage extends React.Component<IDEPAccountPageP...
method componentWillMount (line 43) | public componentWillMount() {
method render (line 47) | public render() {
FILE: ui/src/containers/DEPProfilePage.tsx
type IReduxStateProps (line 29) | interface IReduxStateProps {
type IReduxDispatchProps (line 33) | interface IReduxDispatchProps {
type IRouteParameters (line 39) | interface IRouteParameters {
type IDEPProfilePageProps (line 44) | interface IDEPProfilePageProps extends IReduxStateProps, IReduxDispatchP...
type IDEPProfilePageState (line 48) | interface IDEPProfilePageState {
class UnconnectedDEPProfilePage (line 52) | class UnconnectedDEPProfilePage extends React.Component<IDEPProfilePageP...
method constructor (line 54) | constructor(props: IDEPProfilePageProps) {
method componentWillMount (line 61) | public componentWillMount() {
method render (line 75) | public render() {
FILE: ui/src/containers/DevicePage.tsx
type IReduxStateProps (line 49) | interface IReduxStateProps {
function mapStateToProps (line 55) | function mapStateToProps(state: RootState, ownProps?: any): IReduxStateP...
type IReduxDispatchProps (line 63) | interface IReduxDispatchProps {
function mapDispatchToProps (line 77) | function mapDispatchToProps(dispatch: Dispatch, ownProps?: any): IReduxD...
type IRouteParameters (line 93) | interface IRouteParameters {
type DevicePageProps (line 97) | type DevicePageProps = IReduxStateProps & IReduxDispatchProps & RouteCom...
type IDevicePageState (line 99) | interface IDevicePageState {
class BaseDevicePage (line 103) | class BaseDevicePage extends React.Component<DevicePageProps, IDevicePag...
method componentDidMount (line 105) | public componentDidMount(): void {
method render (line 110) | public render(): JSX.Element {
FILE: ui/src/containers/DeviceRename.tsx
type IReduxStateProps (line 8) | interface IReduxStateProps {
type IReduxDispatchProps (line 12) | interface IReduxDispatchProps {
FILE: ui/src/containers/DevicesPage.tsx
type IReduxStateProps (line 27) | interface IReduxStateProps {
function mapStateToProps (line 33) | function mapStateToProps(state: RootState, ownProps?: any): IReduxStateP...
type IReduxDispatchProps (line 41) | interface IReduxDispatchProps {
function mapDispatchToProps (line 48) | function mapDispatchToProps(dispatch: Dispatch, ownProps?: any): IReduxD...
type DevicesPageProps (line 57) | type DevicesPageProps = IReduxStateProps & IReduxDispatchProps & RouteCo...
class UnconnectedDevicesPage (line 59) | class UnconnectedDevicesPage extends React.Component<DevicesPageProps, a...
method componentWillMount (line 61) | public componentWillMount?(): void {
method render (line 67) | public render(): JSX.Element {
FILE: ui/src/containers/LoginPage.tsx
type IFormValues (line 23) | interface IFormValues {
type IReduxDispatchProps (line 28) | interface IReduxDispatchProps {
type ILoginPageProps (line 32) | interface ILoginPageProps extends IReduxDispatchProps {
type IRouteProps (line 38) | interface IRouteProps {
FILE: ui/src/containers/LogoutPage.tsx
type IFormValues (line 23) | interface IFormValues {
type IReduxDispatchProps (line 28) | interface IReduxDispatchProps {
type ILogoutPageProps (line 32) | interface ILogoutPageProps extends IReduxDispatchProps {
type IRouteProps (line 38) | interface IRouteProps {
FILE: ui/src/containers/ProfilePage.tsx
type IRouteProps (line 27) | interface IRouteProps {
type IReduxStateProps (line 31) | interface IReduxStateProps {
function mapStateToProps (line 36) | function mapStateToProps(state: RootState, ownProps?: any): IReduxStateP...
type IReduxDispatchProps (line 43) | interface IReduxDispatchProps {
function mapDispatchToProps (line 50) | function mapDispatchToProps(dispatch: Dispatch): IReduxDispatchProps {
class UnconnectedProfilePage (line 59) | class UnconnectedProfilePage extends React.Component<RouteComponentProps...
method componentWillMount (line 61) | public componentWillMount?() {
method render (line 67) | public render() {
FILE: ui/src/containers/ProfileUpload.tsx
type IReduxDispatchProps (line 8) | interface IReduxDispatchProps {
FILE: ui/src/containers/ProfilesPage.tsx
type IReduxStateProps (line 22) | interface IReduxStateProps {
type IReduxDispatchProps (line 27) | interface IReduxDispatchProps {
type IProfilesPageProps (line 33) | interface IProfilesPageProps extends IReduxStateProps, IReduxDispatchPro...
type IProfilesPageState (line 37) | interface IProfilesPageState {
class UnconnectedProfilesPage (line 41) | class UnconnectedProfilesPage extends React.Component<IProfilesPageProps...
method componentWillMount (line 43) | public componentWillMount?() {
method render (line 47) | public render(): JSX.Element {
FILE: ui/src/containers/applications/ApplicationDeviceStatus.tsx
type IDispatchProps (line 14) | interface IDispatchProps {
type IStateProps (line 20) | interface IStateProps {
type IApplicationDeviceStatusRouteProps (line 24) | interface IApplicationDeviceStatusRouteProps {
type IApplicationDeviceStatusProps (line 28) | type IApplicationDeviceStatusProps = IDispatchProps & IStateProps &
class UnconnectedApplicationDeviceStatus (line 31) | class UnconnectedApplicationDeviceStatus extends React.Component<IApplic...
method render (line 33) | public render() {
FILE: ui/src/containers/applications/MacOSEntApplicationPage.tsx
type IReduxStateProps (line 13) | interface IReduxStateProps {
type IReduxDispatchProps (line 17) | interface IReduxDispatchProps {
type IRouteParameters (line 21) | interface IRouteParameters {
class UnconnectedApplicationPage (line 26) | class UnconnectedApplicationPage extends React.Component<IReduxStateProp...
method componentWillMount (line 28) | public componentWillMount?() {
method render (line 42) | public render() {
FILE: ui/src/containers/config/DeviceAuthPage.tsx
type ReduxStateProps (line 11) | interface ReduxStateProps {
type ReduxDispatchProps (line 15) | interface ReduxDispatchProps {
type OwnProps (line 20) | interface OwnProps extends ReduxStateProps, ReduxDispatchProps, RouteCom...
class UnconnectedDeviceAuthPage (line 24) | class UnconnectedDeviceAuthPage extends React.Component<OwnProps, undefi...
method componentWillMount (line 26) | public componentWillMount?() {
method render (line 42) | public render() {
FILE: ui/src/containers/config/OrganizationPage.tsx
type IOrganizationPageState (line 19) | interface IOrganizationPageState {
function mapStateToProps (line 23) | function mapStateToProps(state: RootState, ownProps?: any): IOrganizatio...
type IOrganizationPageDispatchProps (line 29) | interface IOrganizationPageDispatchProps {
function mapDispatchToProps (line 34) | function mapDispatchToProps(dispatch: Dispatch) {
type OrganizationPageProps (line 41) | interface OrganizationPageProps extends IOrganizationPageState, IOrganiz...
class UnconnectedOrganizationPage (line 45) | class UnconnectedOrganizationPage extends React.Component<OrganizationPa...
method componentWillMount (line 47) | public componentWillMount?() {
method render (line 55) | public render(): JSX.Element {
FILE: ui/src/containers/devices/DeviceApplications.tsx
type IReduxStateProps (line 15) | interface IReduxStateProps {
function mapStateToProps (line 19) | function mapStateToProps(state: RootState, ownProps?: any): IReduxStateP...
type IReduxDispatchProps (line 25) | interface IReduxDispatchProps {
function mapDispatchToProps (line 29) | function mapDispatchToProps(dispatch: Dispatch): IReduxDispatchProps {
type IDeviceApplicationsRouteProps (line 35) | interface IDeviceApplicationsRouteProps {
type DeviceApplicationsProps (line 39) | type DeviceApplicationsProps = IReduxStateProps &
class UnconnectedDeviceApplications (line 43) | class UnconnectedDeviceApplications extends React.Component<DeviceApplic...
method render (line 44) | public render() {
FILE: ui/src/containers/devices/DeviceCertificates.tsx
type IReduxStateProps (line 13) | interface IReduxStateProps {
function mapStateToProps (line 17) | function mapStateToProps(state: RootState, ownProps?: any): IReduxStateP...
type IReduxDispatchProps (line 23) | interface IReduxDispatchProps {
function mapDispatchToProps (line 27) | function mapDispatchToProps(dispatch: Dispatch): IReduxDispatchProps {
type IDeviceCertificatesRouteProps (line 33) | interface IDeviceCertificatesRouteProps {
type DeviceCertificatesProps (line 37) | type DeviceCertificatesProps = IReduxStateProps &
class UnconnectedDeviceCertificates (line 41) | class UnconnectedDeviceCertificates extends React.Component<DeviceCertif...
method render (line 42) | public render(): JSX.Element {
FILE: ui/src/containers/devices/DeviceCommands.tsx
type IReduxStateProps (line 13) | interface IReduxStateProps {
function mapStateToProps (line 17) | function mapStateToProps(state: RootState, ownProps?: any): IReduxStateP...
type IReduxDispatchProps (line 23) | interface IReduxDispatchProps {
function mapDispatchToProps (line 27) | function mapDispatchToProps(dispatch: Dispatch): IReduxDispatchProps {
type IDeviceCommandsRouteProps (line 33) | interface IDeviceCommandsRouteProps {
type DeviceCommandsProps (line 37) | type DeviceCommandsProps = IReduxStateProps & IReduxDispatchProps & Rout...
class UnconnectedDeviceCommands (line 39) | class UnconnectedDeviceCommands extends React.Component<DeviceCommandsPr...
method render (line 45) | public render() {
FILE: ui/src/containers/devices/DeviceDetail.tsx
type ReduxStateProps (line 12) | interface ReduxStateProps {
function mapStateToProps (line 16) | function mapStateToProps(state: RootState, ownProps?: any): ReduxStatePr...
type ReduxDispatchProps (line 22) | interface ReduxDispatchProps {
function mapDispatchToProps (line 26) | function mapDispatchToProps(dispatch: Dispatch<any>): ReduxDispatchProps {
type DeviceCommandsRouteProps (line 32) | interface DeviceCommandsRouteProps {
type DeviceDetailProps (line 36) | interface DeviceDetailProps extends ReduxStateProps, ReduxDispatchProps,...
type DeviceDetailComponentState (line 40) | interface DeviceDetailComponentState {
class UnconnectedDeviceDetail (line 44) | class UnconnectedDeviceDetail extends React.Component<DeviceDetailProps,...
method render (line 45) | render() {
FILE: ui/src/containers/devices/DeviceOSUpdates.tsx
type IReduxStateProps (line 20) | interface IReduxStateProps {
function mapStateToProps (line 25) | function mapStateToProps(state: RootState, ownProps?: any): IReduxStateP...
type IReduxDispatchProps (line 32) | interface IReduxDispatchProps {
function mapDispatchToProps (line 36) | function mapDispatchToProps(dispatch: Dispatch): IReduxDispatchProps {
type IDeviceOSUpdatesRouteProps (line 42) | interface IDeviceOSUpdatesRouteProps {
type IDeviceOSUpdatesProps (line 46) | interface IDeviceOSUpdatesProps extends IReduxStateProps, IReduxDispatch...
type IBaseDeviceOSUpdatesState (line 51) | interface IBaseDeviceOSUpdatesState {
class BaseDeviceOSUpdates (line 55) | class BaseDeviceOSUpdates extends React.Component<IDeviceOSUpdatesProps,...
method render (line 70) | public render() {
FILE: ui/src/containers/devices/DeviceProfiles.tsx
type ReduxStateProps (line 13) | interface ReduxStateProps {
function mapStateToProps (line 17) | function mapStateToProps(state: RootState, ownProps?: any): ReduxStatePr...
type ReduxDispatchProps (line 23) | interface ReduxDispatchProps {
function mapDispatchToProps (line 27) | function mapDispatchToProps(dispatch: Dispatch): ReduxDispatchProps {
type DeviceProfilesRouteProps (line 33) | interface DeviceProfilesRouteProps {
type DeviceProfilesProps (line 37) | interface DeviceProfilesProps extends ReduxStateProps, ReduxDispatchProp...
class UnconnectedDeviceProfiles (line 41) | class UnconnectedDeviceProfiles extends React.Component<DeviceProfilesPr...
method render (line 47) | public render() {
FILE: ui/src/containers/settings/APNSPage.tsx
type IReduxStateProps (line 22) | interface IReduxStateProps {
type IReduxDispatchProps (line 26) | interface IReduxDispatchProps {
type APNSPageProps (line 31) | type APNSPageProps = IReduxStateProps & IReduxDispatchProps & RouteCompo...
type IAPNSPageState (line 33) | interface IAPNSPageState {
class UnconnectedAPNSPage (line 37) | class UnconnectedAPNSPage extends Component<APNSPageProps, IAPNSPageStat...
method render (line 41) | public render() {
FILE: ui/src/containers/settings/DEPAccountSetupPage.tsx
type ReduxStateProps (line 19) | interface ReduxStateProps {
type ReduxDispatchProps (line 23) | interface ReduxDispatchProps {
type OwnProps (line 27) | interface OwnProps extends ReduxStateProps, ReduxDispatchProps, RouteCom...
type IDEPAccountSetupPageState (line 31) | interface IDEPAccountSetupPageState {
class UnconnectedDEPAccountSetupPage (line 35) | class UnconnectedDEPAccountSetupPage extends React.Component<OwnProps, I...
method constructor (line 41) | constructor(props: any) {
method componentWillMount (line 46) | public componentWillMount?() {
method render (line 50) | public render() {
FILE: ui/src/containers/settings/DEPAccountsPage.tsx
type RouteProps (line 26) | interface RouteProps {
type ReduxStateProps (line 30) | interface ReduxStateProps {
type ReduxDispatchProps (line 34) | interface ReduxDispatchProps {
type OwnProps (line 38) | interface OwnProps extends ReduxStateProps, ReduxDispatchProps, RouteCom...
class UnconnectedDEPAccountsPage (line 42) | class UnconnectedDEPAccountsPage extends React.Component<OwnProps, void> {
method componentWillMount (line 44) | public componentWillMount?() {
method render (line 49) | public render() {
FILE: ui/src/containers/settings/VPPAccountsPage.tsx
type IReduxStateProps (line 18) | interface IReduxStateProps {
type IReduxDispatchProps (line 22) | interface IReduxDispatchProps {
type UnconnectedVPPAccountsPageProps (line 27) | type UnconnectedVPPAccountsPageProps = IReduxStateProps & IReduxDispatch...
class UnconnectedVPPAccountsPage (line 29) | class UnconnectedVPPAccountsPage extends Component<UnconnectedVPPAccount...
method componentWillMount (line 31) | public componentWillMount?() {
method render (line 39) | public render() {
FILE: ui/src/flask-rest-jsonapi.ts
type WrappedChildIndexActionCreator (line 1) | type WrappedChildIndexActionCreator<R> = (id: string, queryParameters: s...
type WrappedIndexActionCreator (line 2) | type WrappedIndexActionCreator<R> = (queryParameters: string[]) => R;
type FlaskFilterOperation (line 4) | type FlaskFilterOperation = "any" | "between" | "endswith" | "eq" | "ge"...
type FlaskFilter (line 8) | interface FlaskFilter {
type FlaskFilters (line 15) | type FlaskFilters = FlaskFilter[];
FILE: ui/src/forms/ApplicationForm.tsx
type IFormData (line 15) | interface IFormData extends Application {
FILE: ui/src/json-api-v1.ts
type Link (line 4) | type Link = string | { href?: string, meta?: { [index: string]: any }};
type Links (line 6) | interface Links {
type ErrorObject (line 18) | interface ErrorObject {
type ErrorResponse (line 34) | interface ErrorResponse {
type ResourceIdentifier (line 41) | interface ResourceIdentifier {
type RelationshipData (line 47) | type RelationshipData = ResourceIdentifier[] | ResourceIdentifier | null;
type Relationship (line 49) | interface Relationship {
type Relationships (line 55) | interface Relationships {
type PrimaryData (line 59) | type PrimaryData = ResourceObject<any> | Array<ResourceObject<any>> | nu...
type DataResponse (line 62) | interface DataResponse<TData, TIncluded> {
type ResourceObject (line 74) | interface ResourceObject<TAttributes> {
type CreateResourceObject (line 83) | interface CreateResourceObject<TAttributes> {
type JSONAPIDocument (line 91) | type JSONAPIDocument<TData = any, TIncluded = any> = DataResponse<TData,...
function isErrorResponse (line 93) | function isErrorResponse(value: JSONAPIDocument): value is ErrorResponse {
FILE: ui/src/models.ts
type InstalledPayload (line 3) | interface InstalledPayload {
FILE: ui/src/reducers/index.ts
type RootState (line 22) | interface RootState {
FILE: ui/src/reducers/interfaces.ts
type IResults (line 7) | interface IResults<TResultArray> {
FILE: ui/src/store/applications/actions.ts
type ApplicationsActionTypes (line 37) | enum ApplicationsActionTypes {
type ManagedActionRequest (line 70) | type ManagedActionRequest = RSAAChildIndexActionRequest<
type ManagedActionResponse (line 74) | type ManagedActionResponse = RSAAIndexActionResponse<
type IndexActionRequest (line 101) | type IndexActionRequest = RSAAIndexActionRequest<
type IndexActionResponse (line 105) | type IndexActionResponse = RSAAIndexActionResponse<
type PostActionRequest (line 132) | type PostActionRequest = RSAAPostActionRequest<
type PostActionResponse (line 137) | type PostActionResponse = RSAAPostActionResponse<
type ReadActionRequest (line 224) | type ReadActionRequest = RSAAReadActionRequest<
type ReadActionResponse (line 228) | type ReadActionResponse = RSAAReadActionResponse<
type PatchActionRequest (line 258) | type PatchActionRequest = RSAAPatchActionRequest<
type PatchActionResponse (line 263) | type PatchActionResponse = RSAAReadActionResponse<
type DeleteActionRequest (line 294) | type DeleteActionRequest = RSAADeleteActionRequest<
type DeleteActionResponse (line 298) | type DeleteActionResponse = RSAADeleteActionResponse<
type PatchRelationshipActionRequest (line 322) | type PatchRelationshipActionRequest = (
type PatchRelationshipActionResponse (line 331) | type PatchRelationshipActionResponse = RSAAReadActionResponse<
type DeleteRelationshipActionRequest (line 357) | type DeleteRelationshipActionRequest = (
type DeleteRelationshipActionResponse (line 366) | type DeleteRelationshipActionResponse = RSAAReadActionResponse<
type ITunesSearchRequestAction (line 392) | interface ITunesSearchRequestAction extends Action<ApplicationsActionTyp...
type ITunesSearchSuccessAction (line 396) | interface ITunesSearchSuccessAction extends Action<ApplicationsActionTyp...
type ITunesSearchFailureAction (line 400) | interface ITunesSearchFailureAction extends Action<ApplicationsActionTyp...
type ItunesSearchActions (line 405) | type ItunesSearchActions = ITunesSearchRequestAction | ITunesSearchSucce...
type ItunesSearchAction (line 406) | type ItunesSearchAction = (
type ApplicationsActions (line 443) | type ApplicationsActions = IndexActionResponse | PostActionResponse | Pa...
FILE: ui/src/store/applications/itunes.ts
constant ITUNES_SEARCH_URL (line 5) | const ITUNES_SEARCH_URL: string = "https://itunes.apple.com/search";
type MediaType (line 7) | enum MediaType {
type EntityType (line 20) | enum EntityType {
type IMediaTypeEntityList (line 53) | interface IMediaTypeEntityList {
type MovieAttribute (line 65) | enum MovieAttribute {
type ArtworkIconSize (line 81) | enum ArtworkIconSize {
type IItunesSearchQuery (line 87) | interface IItunesSearchQuery {
type IiTunesSearchResult (line 100) | interface IiTunesSearchResult {
type IiTunesSoftwareKind (line 105) | enum IiTunesSoftwareKind {
type IiTunesSoftwareSearchResult (line 110) | interface IiTunesSoftwareSearchResult {
FILE: ui/src/store/applications/list_reducer.ts
type IApplicationsState (line 7) | interface IApplicationsState extends IResults<Array<JSONAPIDataObject<Ap...
function applications (line 24) | function applications(state: IApplicationsState = initialState,
FILE: ui/src/store/applications/managed.ts
type ManagedApplicationsActionTypes (line 13) | enum ManagedApplicationsActionTypes {
type IndexActionRequest (line 23) | type IndexActionRequest = RSAAIndexActionRequest<
type IndexActionResponse (line 28) | type IndexActionResponse = RSAAIndexActionResponse<
type DevicesActionRequest (line 51) | type DevicesActionRequest = RSAAChildIndexActionRequest<
type DevicesActionResponse (line 55) | type DevicesActionResponse = RSAAIndexActionResponse<
type ManagedApplicationsActions (line 79) | type ManagedApplicationsActions = IndexActionResponse;
FILE: ui/src/store/applications/managed_reducer.ts
type IManagedApplicationsState (line 7) | interface IManagedApplicationsState extends IResults<Array<JSONAPIDataOb...
FILE: ui/src/store/applications/reducer.ts
type IApplicationState (line 5) | interface IApplicationState {
function application (line 19) | function application(state: IApplicationState = initialState, action: Ap...
FILE: ui/src/store/applications/types.ts
type ApplicationRelationship (line 2) | type ApplicationRelationship = "tags";
type ApplicationDiscriminator (line 4) | enum ApplicationDiscriminator {
type Application (line 9) | interface Application {
type MacStoreApplication (line 34) | interface MacStoreApplication extends Application {
type IOSStoreApplication (line 38) | interface IOSStoreApplication extends Application {
type ManagedApplicationStatus (line 42) | enum ManagedApplicationStatus {
type ManagedApplication (line 65) | interface ManagedApplication {
FILE: ui/src/store/assistant/actions.ts
type NEXT_STEP (line 3) | type NEXT_STEP = 'assistant/NEXT_STEP';
constant NEXT_STEP (line 4) | const NEXT_STEP: NEXT_STEP = 'assistant/NEXT_STEP';
type PREV_STEP (line 6) | type PREV_STEP = 'assistant/PREV_STEP';
constant PREV_STEP (line 7) | const PREV_STEP: PREV_STEP = 'assistant/PREV_STEP';
type NextStepAction (line 9) | interface NextStepAction {
type PrevStepAction (line 13) | interface PrevStepAction {
FILE: ui/src/store/assistant/reducer.ts
type IAssistantState (line 3) | interface IAssistantState {
type AssistantAction (line 13) | type AssistantAction = actions.NextStepAction | actions.PrevStepAction;
function assistant (line 15) | function assistant(state: IAssistantState = initialState, action: Assist...
FILE: ui/src/store/auth/actions.ts
type AuthenticationActionTypes (line 8) | enum AuthenticationActionTypes {
type TokenActionRequest (line 16) | type TokenActionRequest = RSAAction<
type TokenActionRequestCreator (line 21) | type TokenActionRequestCreator = (email: string, password: string) => To...
type ITokenActionResponse (line 23) | interface ITokenActionResponse {
type ITokenSaveRequest (line 56) | interface ITokenSaveRequest extends Action<AuthenticationActionTypes.TOK...
type AuthenticationActions (line 80) | type AuthenticationActions = ITokenActionResponse | Action<Authenticatio...
FILE: ui/src/store/auth/reducer.ts
type IAuthenticationState (line 5) | interface IAuthenticationState {
function reducer (line 30) | function reducer(state: IAuthenticationState = initialState, action: Aut...
FILE: ui/src/store/auth/types.ts
type IOAuth2TokenSuccessResponse (line 1) | interface IOAuth2TokenSuccessResponse {
FILE: ui/src/store/certificates/actions.ts
type INDEX_REQUEST (line 7) | type INDEX_REQUEST = "certificates/INDEX_REQUEST";
constant INDEX_REQUEST (line 8) | const INDEX_REQUEST: INDEX_REQUEST = "certificates/INDEX_REQUEST";
type INDEX_SUCCESS (line 9) | type INDEX_SUCCESS = "certificates/INDEX_SUCCESS";
constant INDEX_SUCCESS (line 10) | const INDEX_SUCCESS: INDEX_SUCCESS = "certificates/INDEX_SUCCESS";
type INDEX_FAILURE (line 11) | type INDEX_FAILURE = "certificates/INDEX_FAILURE";
constant INDEX_FAILURE (line 12) | const INDEX_FAILURE: INDEX_FAILURE = "certificates/INDEX_FAILURE";
type IndexActionRequest (line 14) | type IndexActionRequest = (size?: number, number?: number, sort?: string...
type IndexActionResponse (line 16) | interface IndexActionResponse {
type CERTTYPE_REQUEST (line 55) | type CERTTYPE_REQUEST = "certificates/CERTTYPE_REQUEST";
constant CERTTYPE_REQUEST (line 56) | const CERTTYPE_REQUEST: CERTTYPE_REQUEST = "certificates/CERTTYPE_REQUEST";
type CERTTYPE_SUCCESS (line 57) | type CERTTYPE_SUCCESS = "certificates/CERTTYPE_SUCCESS";
constant CERTTYPE_SUCCESS (line 58) | const CERTTYPE_SUCCESS: CERTTYPE_SUCCESS = "certificates/CERTTYPE_SUCCESS";
type CERTTYPE_FAILURE (line 59) | type CERTTYPE_FAILURE = "certificates/CERTTYPE_FAILURE";
constant CERTTYPE_FAILURE (line 60) | const CERTTYPE_FAILURE: CERTTYPE_FAILURE = "certificates/CERTTYPE_FAILURE";
type FetchCertificateTypeActionRequest (line 62) | type FetchCertificateTypeActionRequest = (certType: string) => RSAAction...
type FetchCertificateTypeActionResponse (line 64) | interface FetchCertificateTypeActionResponse {
type DELETE_REQUEST (line 84) | type DELETE_REQUEST = "certificates/DELETE_REQUEST";
constant DELETE_REQUEST (line 85) | const DELETE_REQUEST: DELETE_REQUEST = "certificates/DELETE_REQUEST";
type DELETE_SUCCESS (line 86) | type DELETE_SUCCESS = "certificates/DELETE_SUCCESS";
constant DELETE_SUCCESS (line 87) | const DELETE_SUCCESS: DELETE_SUCCESS = "certificates/DELETE_SUCCESS";
type DELETE_FAILURE (line 88) | type DELETE_FAILURE = "certificates/DELETE_FAILURE";
constant DELETE_FAILURE (line 89) | const DELETE_FAILURE: DELETE_FAILURE = "certificates/DELETE_FAILURE";
type DeleteCertificateActionRequest (line 91) | type DeleteCertificateActionRequest = (id: number) => RSAAction<DELETE_R...
type DeleteCertificateActionResponse (line 93) | interface DeleteCertificateActionResponse {
FILE: ui/src/store/certificates/ca_actions.ts
type CACERT_REQUEST (line 8) | type CACERT_REQUEST = 'certificates/CACERT_REQUEST';
constant CACERT_REQUEST (line 9) | const CACERT_REQUEST: CACERT_REQUEST = 'certificates/CACERT_REQUEST';
type CACERT_SUCCESS (line 10) | type CACERT_SUCCESS = 'certificates/CACERT_SUCCESS';
constant CACERT_SUCCESS (line 11) | const CACERT_SUCCESS: CACERT_SUCCESS = 'certificates/CACERT_SUCCESS';
type CACERT_FAILURE (line 12) | type CACERT_FAILURE = 'certificates/CACERT_FAILURE';
constant CACERT_FAILURE (line 13) | const CACERT_FAILURE: CACERT_FAILURE = 'certificates/CACERT_FAILURE';
type FetchCACertificatesActionRequest (line 15) | interface FetchCACertificatesActionRequest {
type FetchCACertificatesActionResponse (line 19) | interface FetchCACertificatesActionResponse {
FILE: ui/src/store/certificates/ca_reducer.ts
type CAState (line 5) | interface CAState {
type PushAction (line 20) | type PushAction = actions.FetchCACertificatesActionResponse;
function ca (line 22) | function ca(state: CAState = initialState, action: PushAction): CAState {
FILE: ui/src/store/certificates/push_actions.ts
type PUSHCERT_REQUEST (line 8) | type PUSHCERT_REQUEST = 'certificates/PUSHCERT_REQUEST';
constant PUSHCERT_REQUEST (line 9) | const PUSHCERT_REQUEST: PUSHCERT_REQUEST = 'certificates/PUSHCERT_REQUEST';
type PUSHCERT_SUCCESS (line 10) | type PUSHCERT_SUCCESS = 'certificates/PUSHCERT_SUCCESS';
constant PUSHCERT_SUCCESS (line 11) | const PUSHCERT_SUCCESS: PUSHCERT_SUCCESS = 'certificates/PUSHCERT_SUCCESS';
type PUSHCERT_FAILURE (line 12) | type PUSHCERT_FAILURE = 'certificates/PUSHCERT_FAILURE';
constant PUSHCERT_FAILURE (line 13) | const PUSHCERT_FAILURE: PUSHCERT_FAILURE = 'certificates/PUSHCERT_FAILURE';
type FetchPushCertificatesActionRequest (line 15) | interface FetchPushCertificatesActionRequest {
type FetchPushCertificatesActionResponse (line 19) | interface FetchPushCertificatesActionResponse {
FILE: ui/src/store/certificates/push_reducer.ts
type PushState (line 5) | interface PushState {
type PushAction (line 20) | type PushAction = actions.FetchPushCertificatesActionResponse;
function push (line 22) | function push(state: PushState = initialState, action: PushAction): Push...
FILE: ui/src/store/certificates/reducer.ts
type CertificatesState (line 17) | interface CertificatesState {
type CertificatesAction (line 43) | type CertificatesAction = IndexActionResponse | DeleteCertificateActionR...
function certificates (line 45) | function certificates(state: CertificatesState = initialState, action: C...
FILE: ui/src/store/certificates/ssl_actions.ts
type SSLCERT_REQUEST (line 8) | type SSLCERT_REQUEST = 'certificates/SSLCERT_REQUEST';
constant SSLCERT_REQUEST (line 9) | const SSLCERT_REQUEST: SSLCERT_REQUEST = 'certificates/SSLCERT_REQUEST';
type SSLCERT_SUCCESS (line 10) | type SSLCERT_SUCCESS = 'certificates/SSLCERT_SUCCESS';
constant SSLCERT_SUCCESS (line 11) | const SSLCERT_SUCCESS: SSLCERT_SUCCESS = 'certificates/SSLCERT_SUCCESS';
type SSLCERT_FAILURE (line 12) | type SSLCERT_FAILURE = 'certificates/SSLCERT_FAILURE';
constant SSLCERT_FAILURE (line 13) | const SSLCERT_FAILURE: SSLCERT_FAILURE = 'certificates/SSLCERT_FAILURE';
type FetchSSLCertificatesActionRequest (line 15) | interface FetchSSLCertificatesActionRequest {
type FetchSSLCertificatesActionResponse (line 19) | interface FetchSSLCertificatesActionResponse {
FILE: ui/src/store/certificates/ssl_reducer.ts
type SSLState (line 5) | interface SSLState {
type PushAction (line 20) | type PushAction = actions.FetchSSLCertificatesActionResponse;
function ssl (line 22) | function ssl(state: SSLState = initialState, action: PushAction): SSLSta...
FILE: ui/src/store/certificates/types.ts
type Certificate (line 1) | interface Certificate {
FILE: ui/src/store/commands/actions.ts
type INDEX_REQUEST (line 6) | type INDEX_REQUEST = "commands/INDEX_REQUEST";
constant INDEX_REQUEST (line 7) | const INDEX_REQUEST: INDEX_REQUEST = "commands/INDEX_REQUEST";
type INDEX_SUCCESS (line 8) | type INDEX_SUCCESS = "commands/INDEX_SUCCESS";
constant INDEX_SUCCESS (line 9) | const INDEX_SUCCESS: INDEX_SUCCESS = "commands/INDEX_SUCCESS";
type INDEX_FAILURE (line 10) | type INDEX_FAILURE = "commands/INDEX_FAILURE";
constant INDEX_FAILURE (line 11) | const INDEX_FAILURE: INDEX_FAILURE = "commands/INDEX_FAILURE";
type POST_REQUEST (line 13) | type POST_REQUEST = "commands/POST_REQUEST";
constant POST_REQUEST (line 14) | const POST_REQUEST: POST_REQUEST = "commands/POST_REQUEST";
type POST_SUCCESS (line 15) | type POST_SUCCESS = "commands/POST_SUCCESS";
constant POST_SUCCESS (line 16) | const POST_SUCCESS: POST_SUCCESS = "commands/POST_SUCCESS";
type POST_FAILURE (line 17) | type POST_FAILURE = "commands/POST_FAILURE";
constant POST_FAILURE (line 18) | const POST_FAILURE: POST_FAILURE = "commands/POST_FAILURE";
type PostActionRequest (line 20) | type PostActionRequest = (values: Command) => RSAAction<POST_REQUEST, PO...
type PostActionResponse (line 22) | interface PostActionResponse {
FILE: ui/src/store/commands/reducer.ts
type CommandsState (line 4) | interface CommandsState {
type CommandAction (line 12) | type CommandAction = PostActionResponse;
function commands (line 14) | function commands (state: CommandsState = initialState, action: CommandA...
FILE: ui/src/store/configuration/apns_reducer.ts
type APNSState (line 6) | interface APNSState {
type APNSAction (line 25) | type APNSAction = ICsrActionResponse | UploadCryptedActionResponse;
function apns (line 27) | function apns(state: APNSState = initialState, action: APNSAction): APNS...
FILE: ui/src/store/configuration/mdmcert_actions.ts
type MDMCertActionTypes (line 9) | enum MDMCertActionTypes {
type CsrActionRequest (line 18) | type CsrActionRequest = (email: string) => RSAAction<
type ICsrActionResponse (line 23) | interface ICsrActionResponse {
type UploadCryptedActionRequest (line 45) | type UploadCryptedActionRequest = (file: File) => ThunkAction<void, Root...
type UploadCryptedActionResponse (line 46) | type UploadCryptedActionResponse = RSAAReadActionResponse<
FILE: ui/src/store/configuration/reducer.ts
type ConfigurationState (line 7) | interface ConfigurationState {
function configuration (line 19) | function configuration(state: ConfigurationState = initialState, action:...
FILE: ui/src/store/configuration/scep_actions.ts
type READ_REQUEST (line 5) | type READ_REQUEST = 'scep/READ_REQUEST';
constant READ_REQUEST (line 6) | const READ_REQUEST: READ_REQUEST = 'scep/READ_REQUEST';
type READ_SUCCESS (line 7) | type READ_SUCCESS = 'scep/READ_SUCCESS';
constant READ_SUCCESS (line 8) | const READ_SUCCESS: READ_SUCCESS = 'scep/READ_SUCCESS';
type READ_FAILURE (line 9) | type READ_FAILURE = 'scep/READ_FAILURE';
constant READ_FAILURE (line 10) | const READ_FAILURE: READ_FAILURE = 'scep/READ_FAILURE';
type ReadActionRequest (line 12) | interface ReadActionRequest {
type ReadActionResponse (line 16) | interface ReadActionResponse {
type POST_REQUEST (line 36) | type POST_REQUEST = 'scep/POST_REQUEST';
constant POST_REQUEST (line 37) | const POST_REQUEST: POST_REQUEST = 'scep/POST_REQUEST';
type POST_SUCCESS (line 38) | type POST_SUCCESS = 'scep/POST_SUCCESS';
constant POST_SUCCESS (line 39) | const POST_SUCCESS: POST_SUCCESS = 'scep/POST_SUCCESS';
type POST_FAILURE (line 40) | type POST_FAILURE = 'scep/POST_FAILURE';
constant POST_FAILURE (line 41) | const POST_FAILURE: POST_FAILURE = 'scep/POST_FAILURE';
type PostActionRequest (line 43) | interface PostActionRequest {
type PostActionResponse (line 47) | interface PostActionResponse {
FILE: ui/src/store/configuration/scep_reducer.ts
type SCEPState (line 5) | interface SCEPState {
type SCEPAction (line 19) | type SCEPAction = ReadActionResponse | PostActionResponse;
function scep (line 21) | function scep(state: SCEPState = initialState, action: SCEPAction): SCEP...
FILE: ui/src/store/configuration/types.ts
type SCEPConfiguration (line 1) | interface SCEPConfiguration {
type VPPAccount (line 16) | interface VPPAccount {
type IMDMCertResponse (line 22) | interface IMDMCertResponse {
FILE: ui/src/store/configuration/vpp.ts
type VPPActionTypes (line 15) | enum VPPActionTypes {
type IVPPAction (line 28) | interface IVPPAction {
type TokenActionRequest (line 32) | type TokenActionRequest = RSAAReadActionRequest<VPPActionTypes.TOKEN_REQ...
type TokenActionResponse (line 33) | type TokenActionResponse = RSAAReadActionResponse<VPPActionTypes.TOKEN_R...
type UploadActionRequest (line 50) | type UploadActionRequest = (file: File) => ThunkAction<void, RootState, ...
type UploadActionResponse (line 51) | type UploadActionResponse = RSAAReadActionResponse<VPPActionTypes.UPLOAD...
type IndexActionRequest (line 80) | type IndexActionRequest = RSAAIndexActionRequest<VPPActionTypes.INDEX_RE...
type IndexActionResponse (line 81) | type IndexActionResponse = RSAAIndexActionResponse<VPPActionTypes.INDEX_...
FILE: ui/src/store/configuration/vpp_reducer.ts
type VPPState (line 5) | interface VPPState {
type VPPAction (line 19) | type VPPAction = TokenActionResponse;
function vpp (line 21) | function vpp(state: VPPState = initialState, action: VPPAction): VPPState {
FILE: ui/src/store/constants.ts
constant JSONAPI_HEADERS (line 1) | const JSONAPI_HEADERS = {
constant JSON_HEADERS (line 6) | const JSON_HEADERS = {
constant OAUTH2_CLIENT_ID (line 12) | const OAUTH2_CLIENT_ID = "F8955645-A21D-44AE-9387-42B0800ADF15";
constant OAUTH2_CLIENT_SECRET (line 13) | const OAUTH2_CLIENT_SECRET = "A";
type OtherAction (line 17) | interface OtherAction {
FILE: ui/src/store/dep/account_reducer.ts
type IDEPAccountState (line 7) | interface IDEPAccountState {
FILE: ui/src/store/dep/accounts_reducer.ts
type IDEPAccountsState (line 6) | interface IDEPAccountsState {
function accounts (line 22) | function accounts(state: IDEPAccountsState = initialState, action: DEPAc...
FILE: ui/src/store/dep/actions.ts
type DEPActionTypes (line 29) | enum DEPActionTypes {
type AccountIndexActionResponse (line 65) | type AccountIndexActionResponse = RSAAActionResponse<
type AccountIndexActionCreator (line 72) | type AccountIndexActionCreator = RSAAIndexActionCreator<
type AccountReadActionCreator (line 95) | type AccountReadActionCreator = RSAAReadActionCreator<
type AccountReadActionResponse (line 100) | type AccountReadActionResponse = RSAAActionResponse<
type ProfileIndexActionCreator (line 131) | type ProfileIndexActionCreator = RSAAIndexActionCreator<
type ProfileIndexActionResponse (line 136) | type ProfileIndexActionResponse = RSAAActionResponse<
type ProfileReadActionCreator (line 161) | type ProfileReadActionCreator = RSAAReadActionCreator<
type ProfileReadActionResponse (line 166) | type ProfileReadActionResponse = RSAAActionResponse<
type ProfilePostActionCreator (line 197) | type ProfilePostActionCreator = RSAAPostActionCreator<
type ProfilePostActionResponse (line 203) | type ProfilePostActionResponse = RSAAActionResponse<
type ProfilePatchActionRequest (line 250) | type ProfilePatchActionRequest = RSAAPatchActionCreator<
type DEPActions (line 283) | type DEPActions = AccountIndexActionResponse &
FILE: ui/src/store/dep/profile_reducer.ts
type IDEPProfileState (line 7) | interface IDEPProfileState {
FILE: ui/src/store/dep/profiles_reducer.ts
type IDEPProfilesState (line 6) | interface IDEPProfilesState {
function profiles (line 22) | function profiles(state: IDEPProfilesState = initialState, action: DEPAc...
FILE: ui/src/store/dep/reducer.ts
type IDEPState (line 14) | interface IDEPState {
FILE: ui/src/store/dep/types.ts
type DEPAccountOrgVersion (line 2) | enum DEPAccountOrgVersion {
type DEPAccountOrgType (line 6) | enum DEPAccountOrgType {
type SkipSetupSteps (line 10) | enum SkipSetupSteps {
type DEPAccount (line 43) | interface DEPAccount {
type DEPProfile (line 66) | interface DEPProfile {
FILE: ui/src/store/device/actions.ts
type DevicesActionTypes (line 22) | enum DevicesActionTypes {
type IndexActionRequest (line 64) | type IndexActionRequest = RSAAIndexActionRequest<DevicesActionTypes.INDE...
type IndexActionResponse (line 65) | type IndexActionResponse = RSAAIndexActionResponse<DevicesActionTypes.IN...
type ReadActionRequest (line 110) | type ReadActionRequest = RSAAReadActionRequest<
type ReadActionResponse (line 112) | type ReadActionResponse = RSAAReadActionResponse<
constant READ_CACHE_HIT (line 142) | const READ_CACHE_HIT = "devices/READ_CACHE_HIT";
type READ_CACHE_HIT (line 143) | type READ_CACHE_HIT = typeof READ_CACHE_HIT;
type CacheFetchActionRequest (line 145) | type CacheFetchActionRequest = (id: string, include?: string[]) => Thunk...
type PushActionRequest (line 176) | type PushActionRequest = (id: string | number) =>
type PushActionResponse (line 179) | interface PushActionResponse {
type RestartActionRequest (line 202) | type RestartActionRequest = (id: string | number) => RSAAction<
type RestartActionResponse (line 205) | interface RestartActionResponse {
type ShutdownActionRequest (line 228) | type ShutdownActionRequest = (id: string | number) =>
type ShutdownActionResponse (line 234) | interface ShutdownActionResponse {
type EraseActionRequest (line 259) | type EraseActionRequest = (id: string | number) =>
type EraseActionResponse (line 265) | interface EraseActionResponse {
type LockActionRequest (line 290) | type LockActionRequest = (id: string | number, pin?: string, message?: s...
type LockActionResponse (line 296) | interface LockActionResponse {
type ClearPasscodeActionRequest (line 326) | type ClearPasscodeActionRequest = (id: string | number) =>
type ClearPasscodeActionResponse (line 332) | interface ClearPasscodeActionResponse {
type InventoryActionRequest (line 357) | type InventoryActionRequest = (id: string | number) =>
type InventoryActionResponse (line 362) | interface InventoryActionResponse {
type TEST_REQUEST (line 387) | type TEST_REQUEST = "devices/TEST_REQUEST";
constant TEST_REQUEST (line 388) | const TEST_REQUEST: TEST_REQUEST = "devices/TEST_REQUEST";
type TEST_SUCCESS (line 389) | type TEST_SUCCESS = "devices/TEST_SUCCESS";
constant TEST_SUCCESS (line 390) | const TEST_SUCCESS: TEST_SUCCESS = "devices/TEST_SUCCESS";
type TEST_FAILURE (line 391) | type TEST_FAILURE = "devices/TEST_FAILURE";
constant TEST_FAILURE (line 392) | const TEST_FAILURE: TEST_FAILURE = "devices/TEST_FAILURE";
type TestActionRequest (line 394) | type TestActionRequest = (id: string | number) => RSAAction<TEST_REQUEST...
type TestActionResponse (line 395) | interface TestActionResponse {
type CommandsActionRequest (line 418) | type CommandsActionRequest = RSAAChildIndexActionRequest<
type CommandsActionResponse (line 420) | type CommandsActionResponse = RSAAIndexActionResponse<
type PatchActionRequest (line 447) | type PatchActionRequest = RSAAPatchActionRequest<
type PatchActionResponse (line 449) | type PatchActionResponse = RSAAReadActionResponse<
type PostRelationshipActionRequest (line 480) | type PostRelationshipActionRequest = (parentId: string, relationship: De...
type PostRelationshipActionResponse (line 482) | type PostRelationshipActionResponse = RSAAReadActionResponse<
constant RCPOST_REQUEST (line 507) | const RCPOST_REQUEST = "devices/RCPOST_REQUEST";
type RCPOST_REQUEST (line 508) | type RCPOST_REQUEST = typeof RCPOST_REQUEST;
constant RCPOST_SUCCESS (line 509) | const RCPOST_SUCCESS = "devices/RCPOST_SUCCESS";
type RCPOST_SUCCESS (line 510) | type RCPOST_SUCCESS = typeof RCPOST_SUCCESS;
constant RCPOST_FAILURE (line 511) | const RCPOST_FAILURE = "devices/RCPOST_FAILURE";
type RCPOST_FAILURE (line 512) | type RCPOST_FAILURE = typeof RCPOST_FAILURE;
type PostRelatedActionRequest (line 514) | type PostRelatedActionRequest = <TRelated>(parentId: string, relationshi...
type PostRelatedActionResponse (line 515) | type PostRelatedActionResponse = RSAAReadActionResponse<RCPOST_REQUEST, ...
constant RPATCH_REQUEST (line 552) | const RPATCH_REQUEST = "devices/RPATCH_REQUEST";
type RPATCH_REQUEST (line 553) | type RPATCH_REQUEST = typeof RPATCH_REQUEST;
constant RPATCH_SUCCESS (line 554) | const RPATCH_SUCCESS = "devices/RPATCH_SUCCESS";
type RPATCH_SUCCESS (line 555) | type RPATCH_SUCCESS = typeof RPATCH_SUCCESS;
constant RPATCH_FAILURE (line 556) | const RPATCH_FAILURE = "devices/RPATCH_FAILURE";
type RPATCH_FAILURE (line 557) | type RPATCH_FAILURE = typeof RPATCH_FAILURE;
type PatchRelationshipActionRequest (line 559) | type PatchRelationshipActionRequest = (
type PatchRelationshipActionResponse (line 564) | type PatchRelationshipActionResponse = RSAAReadActionResponse<
FILE: ui/src/store/device/applications.ts
type APPLICATIONS_REQUEST (line 11) | type APPLICATIONS_REQUEST = 'devices/APPLICATIONS_REQUEST';
constant APPLICATIONS_REQUEST (line 12) | const APPLICATIONS_REQUEST: APPLICATIONS_REQUEST = 'devices/APPLICATIONS...
type APPLICATIONS_SUCCESS (line 13) | type APPLICATIONS_SUCCESS = 'devices/APPLICATIONS_SUCCESS';
constant APPLICATIONS_SUCCESS (line 14) | const APPLICATIONS_SUCCESS: APPLICATIONS_SUCCESS = 'devices/APPLICATIONS...
type APPLICATIONS_FAILURE (line 15) | type APPLICATIONS_FAILURE = 'devices/APPLICATIONS_FAILURE';
constant APPLICATIONS_FAILURE (line 16) | const APPLICATIONS_FAILURE: APPLICATIONS_FAILURE = 'devices/APPLICATIONS...
type InstalledApplicationsActionRequest (line 18) | type InstalledApplicationsActionRequest = RSAAChildIndexActionRequest<AP...
type InstalledApplicationsActionResponse (line 19) | type InstalledApplicationsActionResponse = RSAAIndexActionResponse<APPLI...
FILE: ui/src/store/device/available_os_updates_reducer.ts
type AvailableOSUpdatesState (line 10) | interface AvailableOSUpdatesState {
type AvailableOSUpdatesAction (line 26) | type AvailableOSUpdatesAction = AvailableOSUpdatesActionResponse | Other...
function available_os_updates_reducer (line 28) | function available_os_updates_reducer(
FILE: ui/src/store/device/certificates.ts
type CERTIFICATES_REQUEST (line 12) | type CERTIFICATES_REQUEST = 'devices/CERTIFICATES_REQUEST';
constant CERTIFICATES_REQUEST (line 13) | const CERTIFICATES_REQUEST: CERTIFICATES_REQUEST = 'devices/CERTIFICATES...
type CERTIFICATES_SUCCESS (line 14) | type CERTIFICATES_SUCCESS = 'devices/CERTIFICATES_SUCCESS';
constant CERTIFICATES_SUCCESS (line 15) | const CERTIFICATES_SUCCESS: CERTIFICATES_SUCCESS = 'devices/CERTIFICATES...
type CERTIFICATES_FAILURE (line 16) | type CERTIFICATES_FAILURE = 'devices/CERTIFICATES_FAILURE';
constant CERTIFICATES_FAILURE (line 17) | const CERTIFICATES_FAILURE: CERTIFICATES_FAILURE = 'devices/CERTIFICATES...
type CertificatesActionRequest (line 19) | type CertificatesActionRequest = RSAAChildIndexActionRequest<CERTIFICATE...
type CertificatesActionResponse (line 20) | type CertificatesActionResponse = RSAAIndexActionResponse<CERTIFICATES_R...
FILE: ui/src/store/device/commands_reducer.ts
type DeviceCommandsState (line 6) | interface DeviceCommandsState {
type DeviceCommandsAction (line 22) | type DeviceCommandsAction = CommandsActionResponse | OtherAction;
function commands_reducer (line 24) | function commands_reducer(state: DeviceCommandsState = initialState, act...
FILE: ui/src/store/device/installed_applications_reducer.ts
type InstalledApplicationsState (line 9) | interface InstalledApplicationsState {
type InstalledCertificatesAction (line 25) | type InstalledCertificatesAction = InstalledApplicationsActionResponse |...
function installed_applications_reducer (line 27) | function installed_applications_reducer(
FILE: ui/src/store/device/installed_certificates_reducer.ts
type InstalledCertificatesState (line 9) | interface InstalledCertificatesState {
type InstalledCertificatesAction (line 25) | type InstalledCertificatesAction = CertificatesActionResponse | OtherAct...
function installed_certificates_reducer (line 27) | function installed_certificates_reducer(
FILE: ui/src/store/device/installed_profiles_reducer.ts
type InstalledProfilesState (line 9) | interface InstalledProfilesState {
type InstalledProfilesAction (line 25) | type InstalledProfilesAction = InstalledProfilesActionResponse | OtherAc...
function installed_profiles_reducer (line 27) | function installed_profiles_reducer(state: InstalledProfilesState = init...
FILE: ui/src/store/device/profiles.ts
type PROFILES_REQUEST (line 11) | type PROFILES_REQUEST = "devices/PROFILES_REQUEST";
constant PROFILES_REQUEST (line 12) | const PROFILES_REQUEST: PROFILES_REQUEST = "devices/PROFILES_REQUEST";
type PROFILES_SUCCESS (line 13) | type PROFILES_SUCCESS = "devices/PROFILES_SUCCESS";
constant PROFILES_SUCCESS (line 14) | const PROFILES_SUCCESS: PROFILES_SUCCESS = "devices/PROFILES_SUCCESS";
type PROFILES_FAILURE (line 15) | type PROFILES_FAILURE = "devices/PROFILES_FAILURE";
constant PROFILES_FAILURE (line 16) | const PROFILES_FAILURE: PROFILES_FAILURE = "devices/PROFILES_FAILURE";
type InstalledProfilesActionRequest (line 18) | type InstalledProfilesActionRequest = RSAAChildIndexActionRequest<PROFIL...
type InstalledProfilesActionResponse (line 19) | type InstalledProfilesActionResponse = RSAAIndexActionResponse<PROFILES_...
FILE: ui/src/store/device/reducer.ts
type DeviceState (line 19) | interface DeviceState {
type DevicesAction (line 48) | type DevicesAction = ReadActionResponse | InstalledApplicationsActionRes...
function device (line 51) | function device(state: DeviceState = initialState, action: DevicesAction...
FILE: ui/src/store/device/types.ts
type DeviceRelationship (line 2) | type DeviceRelationship = "commands" | "tags" | "groups" | "profiles";
type Device (line 4) | interface Device {
type InstalledCertificate (line 86) | interface InstalledCertificate {
type InstalledApplication (line 92) | interface InstalledApplication {
type InstalledProfile (line 105) | interface InstalledProfile {
type AvailableOSUpdate (line 119) | interface AvailableOSUpdate {
type MDMCommandType (line 134) | enum MDMCommandType {
type Command (line 151) | interface Command {
type DeviceModelName (line 164) | enum DeviceModelName {
type DeviceOperatingSystem (line 171) | enum DeviceOperatingSystem {
function operatingSystem (line 179) | function operatingSystem(model: DeviceModelName): DeviceOperatingSystem {
FILE: ui/src/store/device/updates.ts
constant UPDATES_REQUEST (line 11) | const UPDATES_REQUEST = "devices/UPDATES_REQUEST";
type UPDATES_REQUEST (line 12) | type UPDATES_REQUEST = typeof UPDATES_REQUEST;
constant UPDATES_SUCCESS (line 13) | const UPDATES_SUCCESS = "devices/UPDATES_SUCCESS";
type UPDATES_SUCCESS (line 14) | type UPDATES_SUCCESS = typeof UPDATES_SUCCESS;
constant UPDATES_FAILURE (line 15) | const UPDATES_FAILURE = "devices/UPDATES_FAILURE";
type UPDATES_FAILURE (line 16) | type UPDATES_FAILURE = typeof UPDATES_FAILURE;
type AvailableOSUpdatesActionRequest (line 18) | type AvailableOSUpdatesActionRequest = RSAAChildIndexActionRequest<UPDAT...
type AvailableOSUpdatesActionResponse (line 19) | type AvailableOSUpdatesActionResponse = RSAAIndexActionResponse<UPDATES_...
FILE: ui/src/store/device_groups/actions.ts
type INDEX_REQUEST (line 19) | type INDEX_REQUEST = "device_groups/INDEX_REQUEST";
constant INDEX_REQUEST (line 20) | const INDEX_REQUEST: INDEX_REQUEST = "device_groups/INDEX_REQUEST";
type INDEX_SUCCESS (line 21) | type INDEX_SUCCESS = "device_groups/INDEX_SUCCESS";
constant INDEX_SUCCESS (line 22) | const INDEX_SUCCESS: INDEX_SUCCESS = "device_groups/INDEX_SUCCESS";
type INDEX_FAILURE (line 23) | type INDEX_FAILURE = "device_groups/INDEX_FAILURE";
constant INDEX_FAILURE (line 24) | const INDEX_FAILURE: INDEX_FAILURE = "device_groups/INDEX_FAILURE";
type IndexActionRequest (line 26) | type IndexActionRequest = RSAAIndexActionRequest<INDEX_REQUEST, INDEX_SU...
type IndexActionResponse (line 27) | type IndexActionResponse = RSAAIndexActionResponse<INDEX_REQUEST, INDEX_...
type READ_REQUEST (line 47) | type READ_REQUEST = "device_groups/READ_REQUEST";
constant READ_REQUEST (line 48) | const READ_REQUEST: READ_REQUEST = "device_groups/READ_REQUEST";
type READ_SUCCESS (line 49) | type READ_SUCCESS = "device_groups/READ_SUCCESS";
constant READ_SUCCESS (line 50) | const READ_SUCCESS: READ_SUCCESS = "device_groups/READ_SUCCESS";
type READ_FAILURE (line 51) | type READ_FAILURE = "device_groups/READ_FAILURE";
constant READ_FAILURE (line 52) | const READ_FAILURE: READ_FAILURE = "device_groups/READ_FAILURE";
type ReadActionRequest (line 54) | type ReadActionRequest = RSAAReadActionRequest<READ_REQUEST, READ_SUCCES...
type ReadActionResponse (line 55) | type ReadActionResponse = RSAAReadActionResponse<READ_REQUEST, READ_SUCC...
type POST_REQUEST (line 81) | type POST_REQUEST = "device_groups/POST_REQUEST";
constant POST_REQUEST (line 82) | const POST_REQUEST: POST_REQUEST = "device_groups/POST_REQUEST";
type POST_SUCCESS (line 83) | type POST_SUCCESS = "device_groups/POST_SUCCESS";
constant POST_SUCCESS (line 84) | const POST_SUCCESS: POST_SUCCESS = "device_groups/POST_SUCCESS";
type POST_FAILURE (line 85) | type POST_FAILURE = "device_groups/POST_FAILURE";
constant POST_FAILURE (line 86) | const POST_FAILURE: POST_FAILURE = "device_groups/POST_FAILURE";
type PostActionRequest (line 88) | type PostActionRequest = (values: DeviceGroup) => RSAAction<POST_REQUEST...
type PostActionResponse (line 90) | interface PostActionResponse {
FILE: ui/src/store/device_groups/reducer.ts
type DeviceGroupsState (line 9) | interface DeviceGroupsState {
type DeviceGroupsAction (line 20) | type DeviceGroupsAction = IndexActionResponse | ReadActionResponse;
function device_groups (line 22) | function device_groups(state: DeviceGroupsState = initialState, action: ...
FILE: ui/src/store/device_groups/types.ts
type DeviceGroup (line 1) | interface DeviceGroup {
FILE: ui/src/store/devices/devices.ts
type IDeviceIdMap (line 8) | interface IDeviceIdMap {
type IDevicesState (line 12) | interface IDevicesState {
type DevicesAction (line 37) | type DevicesAction = IndexActionResponse;
function devices (line 39) | function devices(state: IDevicesState = initialState, action: DevicesAct...
FILE: ui/src/store/json-api.ts
constant JSONAPI_HEADERS (line 8) | const JSONAPI_HEADERS = {
type JSONAPIErrorObject (line 14) | interface JSONAPIErrorObject {
type JSONAPIErrorResponse (line 30) | interface JSONAPIErrorResponse {
type JSONAPIResourceIdentifier (line 37) | interface JSONAPIResourceIdentifier {
type JSONAPILink (line 45) | type JSONAPILink = string | { href?: string, meta?: { [index: string]: a...
type JSONAPILinks (line 47) | interface JSONAPILinks {
type JSONAPIRelationship (line 58) | interface JSONAPIRelationship {
type JSONAPIRelationships (line 63) | interface JSONAPIRelationships {
type JSONAPIDataObject (line 67) | interface JSONAPIDataObject<TObject> {
type JSONAPIDataResponse (line 75) | interface JSONAPIDataResponse<TData, TIncluded> {
type JSONAPIDetailResponse (line 86) | interface JSONAPIDetailResponse<TObject, TIncluded> {
type JSONAPIListResponse (line 98) | interface JSONAPIListResponse<TObject> {
function isJSONAPIErrorResponsePayload (line 109) | function isJSONAPIErrorResponsePayload(
type RSAAIndexActionRequest (line 120) | type RSAAIndexActionRequest<TRequest, TSuccess, TFailure> =
type RSAAResponseRequest (line 125) | interface RSAAResponseRequest<TRequest> extends Action<TRequest> {
type RSAAResponseFailure (line 131) | interface RSAAResponseFailure<TFailure> extends Action<TFailure> {
type RSAAResponseSuccess (line 137) | interface RSAAResponseSuccess<TSuccess, TResponse> extends Action<TSucce...
type RSAAIndexActionResponse (line 142) | type RSAAIndexActionResponse<TRequest, TSuccess, TFailure, TObject> =
type RSAAChildIndexActionRequest (line 149) | type RSAAChildIndexActionRequest<TRequest, TSuccess, TFailure> =
type RSAAReadActionRequest (line 153) | type RSAAReadActionRequest<TRequest, TSuccess, TFailure> = (id: string, ...
type RSAAReadActionResponseSuccess (line 156) | interface RSAAReadActionResponseSuccess<TSuccess, TResponse> {
type RSAAReadActionResponse (line 161) | type RSAAReadActionResponse<TRequest, TSuccess, TFailure, TResponse> = R...
type RSAAPostActionRequest (line 166) | type RSAAPostActionRequest<TRequest, TSuccess, TFailure, TValues> = (
type RSAAPostActionResponse (line 170) | type RSAAPostActionResponse<TRequest, TSuccess, TFailure, TResponse> = R...
type RSAAPatchActionRequest (line 173) | type RSAAPatchActionRequest<TRequest, TSuccess, TFailure, TValues> = (id...
type RSAADeleteActionRequest (line 176) | type RSAADeleteActionRequest<TRequest, TSuccess, TFailure> = (id: string...
type RSAADeleteActionResponseSuccess (line 178) | interface RSAADeleteActionResponseSuccess<TSuccess> {
type RSAADeleteActionResponse (line 182) | type RSAADeleteActionResponse<TRequest, TSuccess, TFailure, TResponse> =...
FILE: ui/src/store/mdm.ts
type Command (line 2) | interface Command {
type InstallProfile (line 6) | interface InstallProfile extends Command {
type RemoveProfile (line 10) | interface RemoveProfile extends Command {
type InstallProvisioningProfile (line 14) | interface InstallProvisioningProfile extends Command {
type RemoveProvisioningProfile (line 18) | interface RemoveProvisioningProfile extends Command {
type InstalledApplicationList (line 22) | interface InstalledApplicationList extends Command {
type DeviceInformation (line 27) | interface DeviceInformation extends Command {
type DeviceLock (line 31) | interface DeviceLock extends Command {
type ClearPasscode (line 37) | interface ClearPasscode extends Command {
type EraseDevice (line 41) | interface EraseDevice extends Command {
type RequestMirroring (line 45) | interface RequestMirroring extends Command {
type Restrictions (line 52) | interface Restrictions extends Command {
type DeleteUser (line 56) | interface DeleteUser extends Command {
type InstallApplicationOptions (line 61) | interface InstallApplicationOptions {
type InstallApplication (line 66) | interface InstallApplication extends Command {
type ApplyRedemptionCode (line 77) | interface ApplyRedemptionCode extends Command {
type ManagedApplicationList (line 82) | interface ManagedApplicationList extends Command {
type RemoveApplication (line 86) | interface RemoveApplication extends Command {
type InviteToProgram (line 90) | interface InviteToProgram extends Command {
type ValidateApplications (line 95) | interface ValidateApplications extends Command {
FILE: ui/src/store/organization/actions.ts
type READ_REQUEST (line 6) | type READ_REQUEST = "organization/READ_REQUEST";
constant READ_REQUEST (line 7) | const READ_REQUEST: READ_REQUEST = "organization/READ_REQUEST";
type READ_SUCCESS (line 8) | type READ_SUCCESS = "organization/READ_SUCCESS";
constant READ_SUCCESS (line 9) | const READ_SUCCESS: READ_SUCCESS = "organization/READ_SUCCESS";
type READ_FAILURE (line 10) | type READ_FAILURE = "organization/READ_FAILURE";
constant READ_FAILURE (line 11) | const READ_FAILURE: READ_FAILURE = "organization/READ_FAILURE";
type ReadActionRequest (line 13) | type ReadActionRequest = () => RSAAction<READ_REQUEST, READ_SUCCESS, REA...
type ReadActionResponse (line 15) | type ReadActionResponse = RSAAReadActionResponse<READ_REQUEST, READ_SUCC...
type POST_REQUEST (line 32) | type POST_REQUEST = "organization/POST_REQUEST";
constant POST_REQUEST (line 33) | const POST_REQUEST: POST_REQUEST = "organization/POST_REQUEST";
type POST_SUCCESS (line 34) | type POST_SUCCESS = "organization/POST_SUCCESS";
constant POST_SUCCESS (line 35) | const POST_SUCCESS: POST_SUCCESS = "organization/POST_SUCCESS";
type POST_FAILURE (line 36) | type POST_FAILURE = "organization/POST_FAILURE";
constant POST_FAILURE (line 37) | const POST_FAILURE: POST_FAILURE = "organization/POST_FAILURE";
type PostActionRequest (line 39) | type PostActionRequest = (values: Organization) => RSAAction<POST_REQUES...
type PostActionResponse (line 41) | interface PostActionResponse {
FILE: ui/src/store/organization/reducer.ts
type OrganizationState (line 6) | interface OrganizationState {
type OrganizationAction (line 21) | type OrganizationAction = actions.ReadActionResponse | actions.PostActio...
function organization (line 23) | function organization(state: OrganizationState = initialState, action: O...
FILE: ui/src/store/organization/types.ts
type Organization (line 1) | interface Organization {
FILE: ui/src/store/pki/actions.ts
type NEW_REQUEST (line 6) | type NEW_REQUEST = "signing_requests/NEW_REQUEST";
constant NEW_REQUEST (line 7) | const NEW_REQUEST: NEW_REQUEST = "signing_requests/NEW_REQUEST";
type NEW_SUCCESS (line 8) | type NEW_SUCCESS = "signing_requests/NEW_SUCCESS";
constant NEW_SUCCESS (line 9) | const NEW_SUCCESS: NEW_SUCCESS = "signing_requests/NEW_SUCCESS";
type NEW_FAILURE (line 10) | type NEW_FAILURE = "signing_requests/NEW_FAILURE";
constant NEW_FAILURE (line 11) | const NEW_FAILURE: NEW_FAILURE = "signing_requests/NEW_FAILURE";
FILE: ui/src/store/pki/types.ts
type CertificatePurpose (line 1) | type CertificatePurpose = "apns" | "ssl";
FILE: ui/src/store/profile/reducer.ts
type IProfileState (line 7) | interface IProfileState {
type ProfileAction (line 24) | type ProfileAction = ReadActionResponse | PatchRelationshipActionResponse;
function profile (line 26) | function profile(state: IProfileState = initialState, action: ProfileAct...
FILE: ui/src/store/profiles/actions.ts
type ProfilesActionTypes (line 15) | enum ProfilesActionTypes {
type IndexActionRequest (line 27) | type IndexActionRequest = RSAAIndexActionRequest<ProfilesActionTypes.IND...
type IndexActionResponse (line 28) | type IndexActionResponse = RSAAIndexActionResponse<ProfilesActionTypes.I...
type ReadActionRequest (line 48) | type ReadActionRequest = RSAAReadActionRequest<ProfilesActionTypes.READ_...
type ReadActionResponse (line 49) | type ReadActionResponse = RSAAReadActionResponse<ProfilesActionTypes.REA...
type PatchRelationshipActionRequest (line 75) | type PatchRelationshipActionRequest = (parentId: string, relationship: P...
type PatchRelationshipActionResponse (line 77) | type PatchRelationshipActionResponse = RSAAReadActionResponse<
constant UPLOAD (line 102) | const UPLOAD = "profiles/UPLOAD";
type UPLOAD (line 103) | type UPLOAD = typeof UPLOAD;
constant UPLOAD_REQUEST (line 105) | const UPLOAD_REQUEST = "profiles/UPLOAD_REQUEST";
type UPLOAD_REQUEST (line 106) | type UPLOAD_REQUEST = typeof UPLOAD_REQUEST;
constant UPLOAD_SUCCESS (line 107) | const UPLOAD_SUCCESS = "profiles/UPLOAD_SUCCESS";
type UPLOAD_SUCCESS (line 108) | type UPLOAD_SUCCESS = typeof UPLOAD_SUCCESS;
constant UPLOAD_FAILURE (line 109) | const UPLOAD_FAILURE = "profiles/UPLOAD_FAILURE";
type UPLOAD_FAILURE (line 110) | type UPLOAD_FAILURE = typeof UPLOAD_FAILURE;
type UploadActionRequest (line 112) | type UploadActionRequest = (file: File) => ThunkAction<void, RootState, ...
type UploadActionResponse (line 113) | type UploadActionResponse = RSAAReadActionResponse<UPLOAD_REQUEST, UPLOA...
FILE: ui/src/store/profiles/reducer.ts
type ProfilesState (line 10) | interface ProfilesState extends IResults<Array<JSONAPIDataObject<Profile...
type ProfilesAction (line 29) | type ProfilesAction = IndexActionResponse | UploadActionResponse;
function profiles (line 31) | function profiles(state: ProfilesState = initialState, action: ProfilesA...
FILE: ui/src/store/profiles/types.ts
type Profile (line 1) | interface Profile {
type ProfileRelationship (line 17) | type ProfileRelationship = "tags";
FILE: ui/src/store/redux-api-middleware.ts
type RSAARequestAction (line 10) | interface RSAARequestAction<TRequest> extends Action<TRequest> {
type RSAAFailureAction (line 16) | interface RSAAFailureAction<TFailure> extends Action<TFailure> {
type RSAASuccessAction (line 22) | interface RSAASuccessAction<TSuccess, TResponse> extends Action<TSuccess> {
type RSAAActionResponse (line 27) | type RSAAActionResponse<TRequest, TSuccess, TFailure, TData, TIncluded> =
type RSAAIndexActionCreator (line 33) | type RSAAIndexActionCreator<TRequest, TSuccess, TFailure> =
type RSAAReadActionCreator (line 37) | type RSAAReadActionCreator<TRequest, TSuccess, TFailure> = (id: string, ...
type RSAAPostActionCreator (line 40) | type RSAAPostActionCreator<TRequest, TSuccess, TFailure, TValues> =
type RSAAPatchActionCreator (line 44) | type RSAAPatchActionCreator<TRequest, TSuccess, TFailure, TValues> = (id...
FILE: ui/src/store/table/actions.ts
type TableActionTypes (line 3) | enum TableActionTypes {
type ToggleSelectionActionCreator (line 8) | type ToggleSelectionActionCreator = (key: string, shiftKeyPressed: boole...
type IToggleSelectionAction (line 9) | interface IToggleSelectionAction {
type IToggleAllAction (line 26) | interface IToggleAllAction {
type TableActions (line 36) | type TableActions = IToggleSelectionAction & IToggleAllAction;
FILE: ui/src/store/table/reducer.ts
type ITableState (line 4) | interface ITableState {
FILE: ui/src/store/table/types.ts
type IReactTableState (line 2) | interface IReactTableState {
FILE: ui/src/store/tags/actions.ts
type TagsActionTypes (line 21) | enum TagsActionTypes {
type IndexActionRequest (line 31) | type IndexActionRequest = RSAAIndexActionRequest<TagsActionTypes.INDEX_R...
type IndexActionResponse (line 32) | type IndexActionResponse = RSAAIndexActionResponse<TagsActionTypes.INDEX...
type PostActionRequest (line 52) | type PostActionRequest = RSAAPostActionRequest<TagsActionTypes.POST_REQU...
type PostActionResponse (line 53) | type PostActionResponse = RSAAPostActionResponse<TagsActionTypes.POST_RE...
type CreateAndApplyRequest (line 80) | type CreateAndApplyRequest = (values: Tag) => ThunkAction<void, RootStat...
FILE: ui/src/store/tags/reducer.ts
type ITagsState (line 5) | interface ITagsState {
type TagsAction (line 18) | type TagsAction = IndexActionResponse;
function tags (line 20) | function tags(state: ITagsState = initialState, action: TagsAction): ITa...
FILE: ui/src/store/tags/types.ts
type Tag (line 1) | interface Tag {
Condensed preview — 573 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,706K chars).
[
{
"path": ".circleci/config.yml",
"chars": 134,
"preview": "version: 2\njobs:\n build:\n docker:\n - image: circleci/ruby:2.4.1\n steps:\n - checkout\n - run: echo \""
},
{
"path": ".docker/Dockerfile",
"chars": 5751,
"preview": "FROM python:3.6\n# Adapted from tiangolo-uwsgi-flask (https://github.com/tiangolo/uwsgi-nginx-flask-docker) or\n# (https:/"
},
{
"path": ".docker/entry.sh",
"chars": 1404,
"preview": "#!/usr/bin/env bash\n\necho \"Starting commandment...\"\n\nSSL_HOSTNAME=${SSL_HOSTNAME:-\"commandment.test\"}\n\nPYTHONPATH=/comma"
},
{
"path": ".docker/nginx.conf",
"chars": 1303,
"preview": "server {\n listen 80;\n listen 443 ssl;\n\n ssl_certificate ssl.crt;\n ssl_certificate_key ssl.key;\n ssl_proto"
},
{
"path": ".docker/openssl.cnf",
"chars": 736,
"preview": "[req]\ndistinguished_name = req_distinguished_name\nreq_extensions = v3_req\n\n[req_distinguished_name]\ncountryName = Countr"
},
{
"path": ".docker/settings.cfg.docker",
"chars": 2360,
"preview": "from os import path\ndirname = path.dirname(__file__)\n\n# The public facing hostname of the MDM\n# This will also be used a"
},
{
"path": ".docker/supervisord.conf",
"chars": 493,
"preview": "[supervisord]\nnodaemon=true\n\n[program:uwsgi]\ncommand=/usr/local/bin/uwsgi --ini /etc/uwsgi/uwsgi.ini --ini /etc/uwsgi/uw"
},
{
"path": ".docker/uwsgi-commandment.ini",
"chars": 214,
"preview": "[uwsgi]\nbase = /commandment\n\npythonpath = %(base)\nmodule = commandment:create_app()\nplugins = python3\n\nenv = COMMANDMENT"
},
{
"path": ".docker/uwsgi.ini",
"chars": 240,
"preview": "[uwsgi]\nsocket = /tmp/uwsgi.sock\nchown-socket = nginx:nginx\nchmod-socket = 664\n# Graceful shutdown on SIGTERM, see https"
},
{
"path": ".dockerignore",
"chars": 3250,
"preview": "# Created by .ignore support plugin (hsz.mobi)\n### Python template\n# Byte-compiled / optimized / DLL files\n__pycache__/\n"
},
{
"path": ".gitignore",
"chars": 2392,
"preview": "# Created by .ignore support plugin (hsz.mobi)\n### Python template\n# Byte-compiled / optimized / DLL files\n__pycache__/\n"
},
{
"path": ".gitlab-ci.yml",
"chars": 1515,
"preview": "image: python:3.6.5-stretch\n\nvariables:\n PIP_CACHE_DIR: \"$CI_PROJECT_DIR/.cache\"\n\n#cache:\n# key: ${CI_COMMIT_REF_SLU"
},
{
"path": "LICENSE.txt",
"chars": 1058,
"preview": "Copyright (c) 2015 Jesse Peterson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this "
},
{
"path": "Pipfile",
"chars": 1409,
"preview": "[[source]]\nurl = \"https://pypi.python.org/simple\"\nverify_ssl = true\nname = \"pypi\"\n\n[requires]\npython_version = \"3.6\"\n\n[p"
},
{
"path": "README.rst",
"chars": 1239,
"preview": "===========================\nCommandment Open Source MDM\n===========================\n\n.. image:: https://travis-ci.org/cm"
},
{
"path": "alembic.ini",
"chars": 632,
"preview": "[alembic]\n# path to migration scripts\nscript_location = %(here)s/commandment/alembic\n\nsqlalchemy.url = sqlite:///command"
},
{
"path": "commandment/__init__.py",
"chars": 3328,
"preview": "\"\"\"\nCopyright (c) 2015 Jesse Peterson, 2017 Mosen\nLicensed under the MIT license. See the included LICENSE.txt file for "
},
{
"path": "commandment/ac2/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "commandment/ac2/ac2_app.py",
"chars": 698,
"preview": "from flask import Blueprint, jsonify, current_app\n\nac2_app = Blueprint('ac2_app', __name__)\n\n\n@ac2_app.route('/MDMServic"
},
{
"path": "commandment/alembic/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "commandment/alembic/disabled_versions/072fba4a2256_create_ad_payload_table.py",
"chars": 2374,
"preview": "\"\"\"Create ad_payload table\n\nRevision ID: 072fba4a2256\nRevises: 8186b8ecf0fc\nCreate Date: 2017-05-19 19:50:25.537513\n\n\"\"\""
},
{
"path": "commandment/alembic/disabled_versions/18412434fb57_create_energy_saver_payload_table.py",
"chars": 1543,
"preview": "\"\"\"Create energy_saver_payload table\n\nRevision ID: 18412434fb57\nRevises: 323a90039a6a\nCreate Date: 2017-05-19 19:53:03.1"
},
{
"path": "commandment/alembic/disabled_versions/323a90039a6a_create_email_payload_table.py",
"chars": 1869,
"preview": "\"\"\"Create email_payload table\n\nRevision ID: 323a90039a6a\nRevises: e47e29a9537c\nCreate Date: 2017-05-19 19:52:05.726744\n\n"
},
{
"path": "commandment/alembic/disabled_versions/4eddbcb30464_create_mdm_payload_table.py",
"chars": 1376,
"preview": "\"\"\"Create mdm_payload table\n\nRevision ID: 4eddbcb30464\nRevises: 18412434fb57\nCreate Date: 2017-05-19 19:54:24.264198\n\n\"\""
},
{
"path": "commandment/alembic/disabled_versions/8186b8ecf0fc_create_ad_cert_payload_table.py",
"chars": 1587,
"preview": "\"\"\"Create ad_cert_payload table\n\nRevision ID: 8186b8ecf0fc\nRevises: 13358fb3846b\nCreate Date: 2017-05-19 19:49:07.136996"
},
{
"path": "commandment/alembic/disabled_versions/9dd4e48235e3_create_vpn_payload_table.py",
"chars": 1165,
"preview": "\"\"\"Create vpn_payload table\n\nRevision ID: 9dd4e48235e3\nRevises: e5840df9a88a\nCreate Date: 2017-05-19 19:59:55.582629\n\n\"\""
},
{
"path": "commandment/alembic/disabled_versions/d65049bf4b91_create_wifi_payload_table.py",
"chars": 2471,
"preview": "\"\"\"Create wifi_payload table\n\nRevision ID: d65049bf4b91\nRevises: 9dd4e48235e3\nCreate Date: 2017-05-19 20:00:36.548840\n\n\""
},
{
"path": "commandment/alembic/disabled_versions/da52b64b865f_create_apps_table.py",
"chars": 1091,
"preview": "\"\"\"Create apps table\n\nRevision ID: da52b64b865f\nRevises:\nCreate Date: 2017-05-18 22:27:44.830159\n\n\"\"\"\nfrom alembic impor"
},
{
"path": "commandment/alembic/disabled_versions/e47e29a9537c_create_certificate_payload_table.py",
"chars": 885,
"preview": "\"\"\"Create certificate_payload table\n\nRevision ID: e47e29a9537c\nRevises: 072fba4a2256\nCreate Date: 2017-05-19 19:51:20.67"
},
{
"path": "commandment/alembic/disabled_versions/fc0c134cbb2e_create_password_policy_payload_table.py",
"chars": 1540,
"preview": "\"\"\"Create password_policy_payload table\n\nRevision ID: fc0c134cbb2e\nRevises: 4eddbcb30464\nCreate Date: 2017-05-19 19:56:4"
},
{
"path": "commandment/alembic/env.py",
"chars": 2460,
"preview": "from __future__ import with_statement\nfrom alembic import context\nfrom sqlalchemy import engine_from_config, pool\nfrom l"
},
{
"path": "commandment/alembic/script.py.mako",
"chars": 1207,
"preview": "\"\"\"${message}\n\nRevision ID: ${up_revision}\nRevises: ${down_revision | comma,n}\nCreate Date: ${create_date}\n\n\"\"\"\n\n# From:"
},
{
"path": "commandment/alembic/versions/0201b96ab856_add_ios_available_os_updates_fields.py",
"chars": 1618,
"preview": "\"\"\"add ios available os updates fields\n\nRevision ID: 0201b96ab856\nRevises: e947cdf82307\nCreate Date: 2018-07-01 21:37:27"
},
{
"path": "commandment/alembic/versions/0ab46b2f6d8c_create_users_table.py",
"chars": 742,
"preview": "\"\"\"Create users table\n\nRevision ID: 0ab46b2f6d8c\nRevises: f5237c7e2374\nCreate Date: 2017-05-19 19:35:12.126022\n\n\"\"\"\nfrom"
},
{
"path": "commandment/alembic/versions/0c4c448f4daf_create_device_users_table.py",
"chars": 1211,
"preview": "\"\"\"Create device_users table\n\nRevision ID: 0c4c448f4daf\nRevises: 7d578eb75092\nCreate Date: 2017-05-18 22:32:52.087025\n\n\""
},
{
"path": "commandment/alembic/versions/0e5babc5b9ee_create_vpp_licenses.py",
"chars": 1897,
"preview": "\"\"\"Create vpp_licenses table\n\nRevision ID: 0e5babc5b9ee\nRevises: 875dcce0bf8b\nCreate Date: 2017-07-19 12:56:55.273155\n\n\""
},
{
"path": "commandment/alembic/versions/1005dc7dea01_os_update_settings.py",
"chars": 2688,
"preview": "\"\"\"os_update_settings\n\nRevision ID: 1005dc7dea01\nRevises: b74ca08cfd9a\nCreate Date: 2018-02-02 15:49:22.170956\n\n\"\"\"\n\n# F"
},
{
"path": "commandment/alembic/versions/13358fb3846b_create_subject_alternative_names_table.py",
"chars": 965,
"preview": "\"\"\"Create subject_alternative_names table\n\nRevision ID: 13358fb3846b\nRevises: ea34ae3f1e7e\nCreate Date: 2017-05-19 19:48"
},
{
"path": "commandment/alembic/versions/1532dff16984_drop_device_groups.py",
"chars": 1844,
"preview": "\"\"\"drop device groups\n\nRevision ID: 1532dff16984\nRevises: f8eb70b3aa2b\nCreate Date: 2018-03-13 21:26:13.058020\n\n\"\"\"\n\n# F"
},
{
"path": "commandment/alembic/versions/2808deb9fc62_create_dep_configurations.py",
"chars": 2827,
"preview": "\"\"\"Create DEP configurations\n\nRevision ID: 2808deb9fc62\nRevises: 0201b96ab856\nCreate Date: 2018-07-04 16:57:16.899029\n\n\""
},
{
"path": "commandment/alembic/versions/2f1507bf6dc1_create_application_manifests_table.py",
"chars": 4882,
"preview": "\"\"\"create application_manifests table\n\nRevision ID: 2f1507bf6dc1\nRevises: 7ab500f58a76\nCreate Date: 2017-10-15 17:37:04."
},
{
"path": "commandment/alembic/versions/3061e56045eb_create_certificate_authority.py",
"chars": 1800,
"preview": "\"\"\"create certificate authority\n\nRevision ID: 3061e56045eb\nRevises: 3fb4a904979c\nCreate Date: 2018-06-30 20:53:58.016051"
},
{
"path": "commandment/alembic/versions/3dbf6db7f9eb_application_tags.py",
"chars": 1268,
"preview": "\"\"\"application_tags\n\nRevision ID: 3dbf6db7f9eb\nRevises: 7cf5787a089e\nCreate Date: 2019-01-08 20:51:11.845673\n\n\"\"\"\n\n# Fro"
},
{
"path": "commandment/alembic/versions/3fb4a904979c_general_cleanup.py",
"chars": 2076,
"preview": "\"\"\"general cleanup\n\nRevision ID: 3fb4a904979c\nRevises: 1532dff16984\nCreate Date: 2018-03-13 21:27:55.983564\n\n\"\"\"\n\n# From"
},
{
"path": "commandment/alembic/versions/50188ffaf0cd_create_devices_table.py",
"chars": 6688,
"preview": "\"\"\"Create devices table\n\nRevision ID: 50188ffaf0cd\nRevises: 71ecf957301a\nCreate Date: 2017-05-19 19:39:22.021264\n\n\"\"\"\nfr"
},
{
"path": "commandment/alembic/versions/5b98cc4af6c9_create_profiles_table.py",
"chars": 1890,
"preview": "\"\"\"Create profiles table\n\nRevision ID: 5b98cc4af6c9\nRevises: e78274be170e\nCreate Date: 2017-05-19 19:30:47.058720\n\n\"\"\"\nf"
},
{
"path": "commandment/alembic/versions/6675e981817e_create_available_os_updates_table.py",
"chars": 2051,
"preview": "\"\"\"create available_os_updates table\n\nRevision ID: 6675e981817e\nRevises: 70ff84113e8f\nCreate Date: 2017-06-23 17:40:11.8"
},
{
"path": "commandment/alembic/versions/70ff84113e8f_create_tags.py",
"chars": 1886,
"preview": "\"\"\"Create tags table and join tables\n\nRevision ID: 70ff84113e8f\nRevises: 7ae48ae412d7\nCreate Date: 2017-06-20 17:13:11.5"
},
{
"path": "commandment/alembic/versions/71818e983100_create_application_sources_table.py",
"chars": 1168,
"preview": "\"\"\"Create application_sources table\n\nRevision ID: 71818e983100\nRevises: da52b64b865f\nCreate Date: 2017-05-18 22:29:40.03"
},
{
"path": "commandment/alembic/versions/71ecf957301a_create_commands_table.py",
"chars": 1768,
"preview": "\"\"\"Create commands table\n\nRevision ID: 71ecf957301a\nRevises: af4ba256efde\nCreate Date: 2017-05-19 19:38:21.450906\n\n\"\"\"\nf"
},
{
"path": "commandment/alembic/versions/7ab500f58a76_create_installed_payloads.py",
"chars": 1789,
"preview": "\"\"\"create installed_payloads\n\nRevision ID: 7ab500f58a76\nRevises: f029ac1af3f0\nCreate Date: 2017-07-19 14:17:49.094292\n\n\""
},
{
"path": "commandment/alembic/versions/7cf5787a089e_add_dep_profile_relationships.py",
"chars": 1988,
"preview": "\"\"\"add dep profile relationships\n\nRevision ID: 7cf5787a089e\nRevises: b231394ab475\nCreate Date: 2018-11-06 21:11:54.60618"
},
{
"path": "commandment/alembic/versions/7d578eb75092_create_device_groups_table.py",
"chars": 625,
"preview": "\"\"\"Create device_groups table\n\nRevision ID: 7d578eb75092\nRevises: 71818e983100\nCreate Date: 2017-05-18 22:31:16.686848\n\n"
},
{
"path": "commandment/alembic/versions/80fa1767c7e2_create_oauth_server_models.py",
"chars": 3924,
"preview": "\"\"\"Create OAuth Server Models\n\nRevision ID: 80fa1767c7e2\nRevises: fa4d91c6aacf\nCreate Date: 2019-05-20 20:47:04.928849\n\n"
},
{
"path": "commandment/alembic/versions/875dcce0bf8b_create_vpp_users.py",
"chars": 1496,
"preview": "\"\"\"Create vpp_users table\n\nRevision ID: 875dcce0bf8b\nRevises: a2e0af380181\nCreate Date: 2017-07-19 12:56:02.203987\n\n\"\"\"\n"
},
{
"path": "commandment/alembic/versions/8c866896f76e_create_dep_join_tables.py",
"chars": 1729,
"preview": "\"\"\"empty message\n\nRevision ID: 8c866896f76e\nRevises: 0e5babc5b9ee\nCreate Date: 2017-07-19 12:57:58.086196\n\n\"\"\"\nfrom alem"
},
{
"path": "commandment/alembic/versions/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "commandment/alembic/versions/a1d5ffaa2092_create_installed_applications_table.py",
"chars": 2142,
"preview": "\"\"\"Create installed_applications table\n\nRevision ID: a1d5ffaa2092\nRevises: a35eeb5a216e\nCreate Date: 2017-05-19 19:43:10"
},
{
"path": "commandment/alembic/versions/a2e0af380181_create_dep_profiles.py",
"chars": 2315,
"preview": "\"\"\"Create dep_profiles table\n\nRevision ID: a2e0af380181\nRevises: 6675e981817e\nCreate Date: 2017-07-19 12:50:41.318647\n\n\""
},
{
"path": "commandment/alembic/versions/a35eeb5a216e_create_installed_profiles_table.py",
"chars": 1992,
"preview": "\"\"\"Create installed_profiles table\n\nRevision ID: a35eeb5a216e\nRevises: e16577adc4fd\nCreate Date: 2017-05-19 19:41:46.995"
},
{
"path": "commandment/alembic/versions/a3ddaad5c358_add_dep_device_columns.py",
"chars": 2556,
"preview": "\"\"\"Add DEP device columns\n\nRevision ID: a3ddaad5c358\nRevises: 2808deb9fc62\nCreate Date: 2018-07-04 21:44:41.549806\n\n\"\"\"\n"
},
{
"path": "commandment/alembic/versions/af4ba256efde_create_certificates_table.py",
"chars": 2030,
"preview": "\"\"\"Create certificates table\n\nRevision ID: af4ba256efde\nRevises: 0ab46b2f6d8c\nCreate Date: 2017-05-19 19:36:12.171390\n\n\""
},
{
"path": "commandment/alembic/versions/b231394ab475_add_scep_config_source_types.py",
"chars": 812,
"preview": "\"\"\"add scep_config source types\n\nRevision ID: b231394ab475\nRevises: a3ddaad5c358\nCreate Date: 2018-09-07 07:50:10.467330"
},
{
"path": "commandment/alembic/versions/b74ca08cfd9a_create_applications_tables.py",
"chars": 3212,
"preview": "\"\"\"create applications tables\n\nRevision ID: b74ca08cfd9a\nRevises: 2f1507bf6dc1\nCreate Date: 2017-10-19 21:26:19.927682\n\n"
},
{
"path": "commandment/alembic/versions/ba4849d8c8ad_create_device_group_devices_table.py",
"chars": 859,
"preview": "\"\"\"Create device_group_devices table\n\nRevision ID: ba4849d8c8ad\nRevises: a1d5ffaa2092\nCreate Date: 2017-05-19 19:44:37.4"
},
{
"path": "commandment/alembic/versions/d5b32b5cc74e_add_dep_profile_id_to_device.py",
"chars": 1413,
"preview": "\"\"\"add dep profile id to device\n\nRevision ID: d5b32b5cc74e\nRevises: 1005dc7dea01\nCreate Date: 2018-03-13 21:16:23.964086"
},
{
"path": "commandment/alembic/versions/dd74229d17b9_create_payload_dependencies_table.py",
"chars": 856,
"preview": "\"\"\"Create payload_dependencies table\n\nRevision ID: dd74229d17b9\nRevises: d65049bf4b91\nCreate Date: 2017-05-19 20:02:17.1"
},
{
"path": "commandment/alembic/versions/e16577adc4fd_create_installed_certificates_table.py",
"chars": 1625,
"preview": "\"\"\"Create installed_certificates table\n\nRevision ID: e16577adc4fd\nRevises: 50188ffaf0cd\nCreate Date: 2017-05-19 19:40:56"
},
{
"path": "commandment/alembic/versions/e5840df9a88a_create_scep_payload_table.py",
"chars": 1624,
"preview": "\"\"\"Create scep_payload table\n\nRevision ID: e5840df9a88a\nRevises: fc0c134cbb2e\nCreate Date: 2017-05-19 19:58:54.048729\n\n\""
},
{
"path": "commandment/alembic/versions/e58afdc17baa_create_rsa_private_keys_table.py",
"chars": 636,
"preview": "\"\"\"Create rsa_private_keys table\n\nRevision ID: e58afdc17baa\nRevises: 5b98cc4af6c9\nCreate Date: 2017-05-19 19:32:28.45494"
},
{
"path": "commandment/alembic/versions/e78274be170e_create_organizations_table.py",
"chars": 1577,
"preview": "\"\"\"Create organizations table\n\nRevision ID: e78274be170e\nRevises: e9b0a4f7b595\nCreate Date: 2017-05-19 19:28:42.596244\n\n"
},
{
"path": "commandment/alembic/versions/e947cdf82307_add_ios_installed_application_fields.py",
"chars": 2289,
"preview": "\"\"\"add ios installed application fields\n\nRevision ID: e947cdf82307\nRevises: 3061e56045eb\nCreate Date: 2018-07-01 20:30:5"
},
{
"path": "commandment/alembic/versions/e9b0a4f7b595_create_payloads_table.py",
"chars": 1383,
"preview": "\"\"\"Create payloads table\n\nRevision ID: e9b0a4f7b595\nRevises: 0c4c448f4daf\nCreate Date: 2017-05-18 22:34:37.838655\n\n\"\"\"\nf"
},
{
"path": "commandment/alembic/versions/ea34ae3f1e7e_create_profile_payloads_table.py",
"chars": 756,
"preview": "\"\"\"Create profile_payloads table\n\nRevision ID: ea34ae3f1e7e\nRevises: ba4849d8c8ad\nCreate Date: 2017-05-19 19:45:34.37547"
},
{
"path": "commandment/alembic/versions/f029ac1af3f0_create_vpp_accounts.py",
"chars": 1464,
"preview": "\"\"\"Create vpp_accounts table\n\nRevision ID: f029ac1af3f0\nRevises: 8c866896f76e\nCreate Date: 2017-07-19 13:02:13.563903\n\n\""
},
{
"path": "commandment/alembic/versions/f5237c7e2374_create_scep_config_table.py",
"chars": 2091,
"preview": "\"\"\"Create scep_config table\n\nRevision ID: f5237c7e2374\nRevises: e58afdc17baa\nCreate Date: 2017-05-19 19:34:00.120370\n\n\"\""
},
{
"path": "commandment/alembic/versions/f8eb70b3aa2b_create_application_manifests.py",
"chars": 3751,
"preview": "\"\"\"create application manifests\n\nRevision ID: f8eb70b3aa2b\nRevises: d5b32b5cc74e\nCreate Date: 2018-03-13 21:21:31.277764"
},
{
"path": "commandment/alembic/versions/fa4d91c6aacf_create_managed_applications_table.py",
"chars": 1647,
"preview": "\"\"\"create_managed_applications_table\n\nRevision ID: fa4d91c6aacf\nRevises: 3dbf6db7f9eb\nCreate Date: 2019-01-10 10:01:10.7"
},
{
"path": "commandment/api/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "commandment/api/app_json.py",
"chars": 11882,
"preview": "\"\"\"\nThis module contains API endpoints which do not fit with the JSON-API specification.\n\"\"\"\nimport io\nfrom flask import"
},
{
"path": "commandment/api/app_jsonapi.py",
"chars": 2423,
"preview": "\"\"\"\n This module contains all of the API generated using the Flask-REST-JSONAPI extension.\n\"\"\"\nfrom flask import Blue"
},
{
"path": "commandment/api/configuration.py",
"chars": 2976,
"preview": "\"\"\"\nThis module contains a Blueprint for API endpoints relating to system configuration.\n\"\"\"\nfrom flask import Blueprint"
},
{
"path": "commandment/api/resources.py",
"chars": 5139,
"preview": "\"\"\"\n This module defines resources, as required by the Flask-REST-JSONAPI package. This represents most of the REST A"
},
{
"path": "commandment/api/schema.py",
"chars": 8960,
"preview": "\"\"\"\n This module contains schema definitions for Marshmallow-JSONAPI and therefore Flask-REST-JSONAPI.\n It also co"
},
{
"path": "commandment/apns/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "commandment/apns/app.py",
"chars": 6160,
"preview": "from datetime import datetime\nfrom flask import Blueprint, request, abort, current_app, jsonify\nfrom sqlalchemy.orm.exc "
},
{
"path": "commandment/apns/mdmcert.py",
"chars": 3855,
"preview": "\"\"\"\nCopyright (c) 2015 Jesse Peterson, 2017 Mosen\nLicensed under the MIT license. See the included LICENSE.txt file for "
},
{
"path": "commandment/apns/push.py",
"chars": 4637,
"preview": "\"\"\"\nCopyright (c) 2015 Jesse Peterson\nLicensed under the MIT license. See the included LICENSE.txt file for details.\n\nAt"
},
{
"path": "commandment/apns/schema.py",
"chars": 276,
"preview": "from marshmallow import Schema, fields\n\n\nclass PushResponseFlatSchema(Schema):\n \"\"\"This structure mimics the fields o"
},
{
"path": "commandment/apns/threads.py",
"chars": 2834,
"preview": "from typing import Tuple\nimport logging\nimport threading\nfrom datetime import datetime\nimport dateutil.parser\nfrom flask"
},
{
"path": "commandment/app.py",
"chars": 59,
"preview": "from commandment import create_app\n\napp = create_app(None)\n"
},
{
"path": "commandment/apps/__init__.py",
"chars": 1013,
"preview": "from enum import Enum\n\n\nclass ManagedAppStatus(Enum):\n \"\"\"A list of possible Managed Application statuses returned by"
},
{
"path": "commandment/apps/app_jsonapi.py",
"chars": 1638,
"preview": "from flask import Blueprint, request\nfrom flask_rest_jsonapi import Api\n\nfrom commandment.apps.resources import Applicat"
},
{
"path": "commandment/apps/models.py",
"chars": 12020,
"preview": "from enum import Enum, IntEnum, IntFlag\n\nfrom commandment.apps import ManagedAppStatus\nfrom ..models import db\n\n\nclass M"
},
{
"path": "commandment/apps/resources.py",
"chars": 4398,
"preview": "from sqlalchemy.orm.exc import NoResultFound\nfrom flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelati"
},
{
"path": "commandment/apps/schema.py",
"chars": 3268,
"preview": "from marshmallow_jsonapi import fields\nfrom marshmallow_jsonapi.flask import Relationship, Schema\n\n\nclass ApplicationSch"
},
{
"path": "commandment/auth/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "commandment/auth/app.py",
"chars": 1298,
"preview": "from flask import Blueprint, request\nfrom .oauth2 import authorization\n\noauth_app = Blueprint('oauth_app', __name__)\n\n# "
},
{
"path": "commandment/auth/models.py",
"chars": 1045,
"preview": "from commandment.models import db\nfrom authlib.flask.oauth2.sqla import OAuth2ClientMixin, OAuth2TokenMixin\n\n\nclass User"
},
{
"path": "commandment/auth/oauth2.py",
"chars": 6520,
"preview": "from flask import current_app\nfrom authlib.flask.oauth2 import (\n AuthorizationServer,\n ResourceProtector,\n)\nfrom "
},
{
"path": "commandment/cli.py",
"chars": 2571,
"preview": "#!/usr/bin/env python\n\"\"\"\nCopyright (c) 2015 Jesse Peterson, 2017 Mosen\nLicensed under the MIT license. See the included"
},
{
"path": "commandment/cms/__init__.py",
"chars": 2541,
"preview": "from typing import Union, Optional, Type\nfrom asn1crypto.cms import CertificateSet, SignerIdentifier, Certificate, Signe"
},
{
"path": "commandment/cms/decorators.py",
"chars": 5451,
"preview": "from typing import List, Tuple\n\nfrom asn1crypto.cms import CMSAttribute\nfrom cryptography.exceptions import InvalidSigna"
},
{
"path": "commandment/dbtypes.py",
"chars": 2653,
"preview": "from sqlalchemy.types import TypeDecorator, CHAR\nfrom sqlalchemy.dialects.postgresql import UUID\nimport uuid\nimport json"
},
{
"path": "commandment/decorators.py",
"chars": 1480,
"preview": "from functools import wraps\n\nfrom flask import request, abort, current_app, g\nfrom cryptography import x509\nfrom cryptog"
},
{
"path": "commandment/default_settings.py",
"chars": 9962,
"preview": "# Flask Dev Server\nPORT = 5443\n\n# Flask-Alembic imports configuration from here instead of the alembic.ini\nALEMBIC = {\n "
},
{
"path": "commandment/dep/__init__.py",
"chars": 3891,
"preview": "from typing import Set, Dict\nfrom enum import Enum\n\n\nclass SetupAssistantStep(Enum):\n \"\"\"This enumeration contains al"
},
{
"path": "commandment/dep/app.py",
"chars": 8368,
"preview": "import sqlalchemy.orm.exc\nimport datetime\nimport dateutil.parser\n\nfrom flask import Blueprint, jsonify, g, current_app, "
},
{
"path": "commandment/dep/apple_schema.py",
"chars": 3215,
"preview": "from marshmallow import fields, Schema\nfrom marshmallow_enum import EnumField\nfrom . import SetupAssistantStep\n\n\nclass A"
},
{
"path": "commandment/dep/cli.py",
"chars": 1575,
"preview": "import argparse\nimport logging\nimport asyncio\nfrom commandment.dep.dep import DEP\n\nparser = argparse.ArgumentParser()\npa"
},
{
"path": "commandment/dep/dep.py",
"chars": 13877,
"preview": "from collections.abc import Iterator\nfrom typing import Union, List, Optional\nimport requests\nfrom requests.auth import "
},
{
"path": "commandment/dep/errors.py",
"chars": 1084,
"preview": "from requests import Response, HTTPError\n\n\nclass DEPServiceError(HTTPError):\n \"\"\"DEPServiceError inherits from reques"
},
{
"path": "commandment/dep/models.py",
"chars": 5091,
"preview": "from cryptography import x509\nfrom commandment.dep import SkipSetupSteps, DEPOrgType, DEPOrgVersion, SetupAssistantStep\n"
},
{
"path": "commandment/dep/resources.py",
"chars": 1352,
"preview": "from flask import url_for\nfrom flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship\nfrom .schema"
},
{
"path": "commandment/dep/schema.py",
"chars": 7092,
"preview": "from flask import url_for\nfrom marshmallow_jsonapi.flask import Relationship, Schema\nfrom marshmallow_jsonapi import fie"
},
{
"path": "commandment/dep/smime.py",
"chars": 3270,
"preview": "from typing import Optional\nimport email\nfrom cryptography.hazmat.backends import default_backend\nfrom cryptography.hazm"
},
{
"path": "commandment/dep/threads.py",
"chars": 10001,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"\nCopyright (c) 2015 Jesse Peterson, 2018 Mosen\nLicensed under the MIT license. See the includ"
},
{
"path": "commandment/deprecated/models.py",
"chars": 11359,
"preview": "from enum import Enum\n\nfrom sqlalchemy import Column, Integer, String, ForeignKey, Table, Text, Boolean, DateTime, Enum "
},
{
"path": "commandment/deprecated/schema.py",
"chars": 6766,
"preview": "\n# @register_payload_schema('com.apple.ADCertificate.managed')\n# class ADCertificatePayload(Payload):\n# Description "
},
{
"path": "commandment/enroll/__init__.py",
"chars": 1030,
"preview": "from enum import Enum\n\n\nclass DeviceAttributes(Enum):\n \"\"\"This enumeration describes all of the device attributes ava"
},
{
"path": "commandment/enroll/app.py",
"chars": 8470,
"preview": "\"\"\"\nThe enroll blueprint covers all enrolment scenarios such as:\n\n- Over-the-Air profile delivery\n- Direct enrolment (de"
},
{
"path": "commandment/enroll/profiles.py",
"chars": 5750,
"preview": "import os.path\nfrom typing import Optional\nfrom uuid import uuid4\nfrom flask import abort, current_app, url_for\nfrom sql"
},
{
"path": "commandment/enroll/util.py",
"chars": 4617,
"preview": "import os.path\nfrom typing import Optional\nfrom flask import abort, current_app\n\nfrom commandment.enroll.profiles import"
},
{
"path": "commandment/errors.py",
"chars": 809,
"preview": "from typing import Optional, Dict\nfrom flask import jsonify\n\n\nclass JSONAPIError(Exception):\n\n def __init__(self, tit"
},
{
"path": "commandment/inventory/__init__.py",
"chars": 7554,
"preview": "\n# These applications should not be reported on because they are part of the operating system.\nDEFAULT_BUNDLE_ID_BLACKLI"
},
{
"path": "commandment/inventory/api.py",
"chars": 2632,
"preview": "from flask import Blueprint, send_file\nfrom flask_rest_jsonapi import Api\nimport io\n\nfrom commandment.inventory.models i"
},
{
"path": "commandment/inventory/models.py",
"chars": 8581,
"preview": "from sqlalchemy.ext.mutable import MutableList\n\nfrom commandment.models import db\nfrom commandment.dbtypes import GUID, "
},
{
"path": "commandment/inventory/resources.py",
"chars": 4712,
"preview": "from flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship\nfrom flask_rest_jsonapi.exceptions imp"
},
{
"path": "commandment/inventory/schema.py",
"chars": 3328,
"preview": "from marshmallow_jsonapi import fields\nfrom marshmallow_jsonapi.flask import Relationship, Schema\n\n\nclass InstalledProfi"
},
{
"path": "commandment/mdm/__init__.py",
"chars": 5606,
"preview": "from typing import Set\nfrom enum import IntFlag, auto, Enum, IntEnum\n\n\nclass CommandType(Enum):\n ProfileList = 'Profi"
},
{
"path": "commandment/mdm/api.py",
"chars": 375,
"preview": "from flask import Blueprint\nfrom commandment.mdm.resources import CommandsList, CommandDetail\nfrom commandment.api.app_j"
},
{
"path": "commandment/mdm/app.py",
"chars": 10885,
"preview": "\"\"\"\nCopyright (c) 2015 Jesse Peterson, 2017 Mosen\nLicensed under the MIT license. See the included LICENSE.txt file for "
},
{
"path": "commandment/mdm/commands.py",
"chars": 21779,
"preview": "from enum import Enum\nfrom uuid import uuid4, UUID\nfrom typing import Dict, Set, List, Type, ClassVar, Any, Optional, Tu"
},
{
"path": "commandment/mdm/decorators.py",
"chars": 279,
"preview": "from functools import wraps\n\n\ndef handle_error_status(func):\n \"\"\"This decorator looks at the request for an Error sta"
},
{
"path": "commandment/mdm/handlers.py",
"chars": 13286,
"preview": "from binascii import hexlify\n\nfrom cryptography import x509\nfrom cryptography.hazmat.backends import default_backend\nfro"
},
{
"path": "commandment/mdm/models.py",
"chars": 0,
"preview": ""
},
{
"path": "commandment/mdm/resources.py",
"chars": 1333,
"preview": "from flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship\nfrom flask_rest_jsonapi.exceptions imp"
},
{
"path": "commandment/mdm/response_schema.py",
"chars": 12364,
"preview": "from typing import Optional\nfrom marshmallow import Schema, fields, post_load, ValidationError\nfrom marshmallow_enum imp"
},
{
"path": "commandment/mdm/routers.py",
"chars": 4047,
"preview": "\"\"\"This module contains routers which direct the request towards a certain module or function based upon the CONTENT\nof "
},
{
"path": "commandment/mdm/schema.py",
"chars": 786,
"preview": "from marshmallow_jsonapi import fields\nfrom marshmallow_jsonapi.flask import Relationship, Schema\n\n\nclass CommandSchema("
},
{
"path": "commandment/mdm/util.py",
"chars": 1445,
"preview": "from commandment.mdm import commands\nfrom commandment.models import db, Device, Command\n\n\ndef queryresponses_to_query_se"
},
{
"path": "commandment/models.py",
"chars": 25010,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"\nCopyright (c) 2015 Jesse Peterson, 2017 Mosen\nLicensed under the MIT license. See the includ"
},
{
"path": "commandment/mutablelist.py",
"chars": 3322,
"preview": "\"\"\"\nCopyright (c) 2015 Jesse Peterson, 2017 Mosen\nLicensed under the MIT license. See the included LICENSE.txt file for "
},
{
"path": "commandment/omdm/__init__.py",
"chars": 361,
"preview": "from flask import Blueprint, current_app\nfrom uuid import uuid4\nimport plistlib\n\nomdm_app = Blueprint('omdm_app', __name"
},
{
"path": "commandment/omdm/models.py",
"chars": 215,
"preview": "from flask_sqlalchemy import SQLAlchemy\n\ndb = SQLAlchemy()\n\nfrom sqlalchemy import Integer, String, ForeignKey, Table, T"
},
{
"path": "commandment/pkg/__init__.py",
"chars": 170,
"preview": "from enum import Enum\n\n\nclass ManifestAssetKind(Enum):\n SoftwarePackage = 'software-package'\n FullSizeImage = 'ful"
},
{
"path": "commandment/pkg/appmanifest.py",
"chars": 3635,
"preview": "import argparse\nfrom typing import List, Tuple, Optional\nfrom bixar.archive import XarFile\nfrom xml.etree import Element"
},
{
"path": "commandment/pkg/manifest.py",
"chars": 879,
"preview": "from typing import List, Union\nimport hashlib\nimport io\n\n# Required for InstallApplication to work.\nDEFAULT_MD5_CHUNK_SI"
},
{
"path": "commandment/pkg/old_app_manifest.py",
"chars": 3477,
"preview": "\"\"\"\nCopyright (c) 2015 Jesse Peterson\nLicensed under the MIT license. See the included LICENSE.txt file for details.\n\"\"\""
},
{
"path": "commandment/pkg/schema.py",
"chars": 834,
"preview": "from marshmallow import Schema, fields\n\n\nclass Asset(Schema):\n kind = fields.String(default='software-package')\n m"
},
{
"path": "commandment/pki/ca.py",
"chars": 605,
"preview": "from flask import g, current_app\nimport sqlalchemy.orm.exc\n\nfrom .models import CertificateAuthority\nfrom commandment.mo"
},
{
"path": "commandment/pki/models.py",
"chars": 14484,
"preview": "\"\"\"\nThis module contains the SQLAlchemy models for PKI related functionality.\n\"\"\"\nfrom enum import Enum\n\nfrom commandmen"
},
{
"path": "commandment/pki/openssl.py",
"chars": 761,
"preview": "# Regrettably, some functionality must come from PyOpenSSL\nfrom typing import Optional\nfrom cryptography.hazmat.primitiv"
},
{
"path": "commandment/pki/ormutils.py",
"chars": 1137,
"preview": "from typing import Optional\n\nfrom asn1crypto.cms import ContentInfo, EnvelopedData, KeyTransRecipientInfo, RecipientIden"
},
{
"path": "commandment/pki/serialization.py",
"chars": 2081,
"preview": "from cryptography.hazmat.backends import default_backend\nfrom cryptography import x509\nfrom cryptography.x509.oid import"
},
{
"path": "commandment/pki/ssl.py",
"chars": 2586,
"preview": "import datetime\nfrom typing import Optional\nfrom cryptography.hazmat.backends import default_backend\nfrom cryptography.h"
},
{
"path": "commandment/plistutil/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "commandment/plistutil/nonewriter.py",
"chars": 1603,
"preview": "from io import BytesIO\nfrom plistlib import _PlistWriter, FMT_XML, _FORMATS\n\n\nclass PlistNoneWriter(_PlistWriter):\n \""
},
{
"path": "commandment/profiles/__init__.py",
"chars": 283,
"preview": "\"\"\"\nCopyright (c) 2015 Jesse Peterson, 2017 Mosen\nLicensed under the MIT license. See the included LICENSE.txt file for "
},
{
"path": "commandment/profiles/ad.py",
"chars": 727,
"preview": "from typing import Set\nfrom enum import Enum, Flag, auto\n\n\nclass ADMountStyle(Enum):\n AFP = 'afp'\n SMB = 'smb'\n\n\nc"
},
{
"path": "commandment/profiles/api.py",
"chars": 676,
"preview": "from flask import Blueprint\nfrom flask_rest_jsonapi import Api\nfrom commandment.profiles.resources import ProfilesList, "
},
{
"path": "commandment/profiles/certificates.py",
"chars": 370,
"preview": "\"\"\"\nCopyright (c) 2015 Jesse Peterson, 2017 Mosen\nLicensed under the MIT license. See the included LICENSE.txt file for "
},
{
"path": "commandment/profiles/eap.py",
"chars": 677,
"preview": "from typing import Set\nfrom enum import Enum, IntEnum\n\n\nclass EAPTypes(IntEnum):\n \"\"\"EAP Types accepted by the EAPCli"
},
{
"path": "commandment/profiles/email.py",
"chars": 302,
"preview": "from enum import Enum\n\nclass EmailAccountType(Enum):\n POP = 'EmailTypePOP'\n IMAP = 'EmailTypeIMAP'\n\n\nclass EmailAu"
},
{
"path": "commandment/profiles/energy.py",
"chars": 561,
"preview": "from enum import Enum, IntFlag, auto\n\n\nclass ScheduledPowerEventType(Enum):\n wake = 'wake'\n wakepoweron = 'wakepow"
},
{
"path": "commandment/profiles/models.py",
"chars": 5352,
"preview": "from commandment.profiles import PayloadScope\nfrom commandment.profiles.certificates import KeyUsage\nfrom ..dbtypes impo"
},
{
"path": "commandment/profiles/plist_schema.py",
"chars": 6619,
"preview": "\"\"\"\nThis module defines marshmallow schemas for use in converting .mobileconfig (plist) representations into SQLAlchemy\n"
},
{
"path": "commandment/profiles/resources.py",
"chars": 738,
"preview": "from flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship\nfrom commandment.models import db\nfrom"
},
{
"path": "commandment/profiles/schema.py",
"chars": 1032,
"preview": "from marshmallow_jsonapi import fields\nfrom marshmallow_jsonapi.flask import Relationship, Schema\nfrom marshmallow impor"
},
{
"path": "commandment/profiles/vpn.py",
"chars": 162,
"preview": "from enum import Enum\n\nclass VPNType(Enum):\n L2TP = 'L2TP'\n PPTP = 'PPTP'\n IPSec = 'IPSec'\n IKEv2 = 'IKEv2'\n"
},
{
"path": "commandment/profiles/wifi.py",
"chars": 230,
"preview": "from enum import Enum\n\n\nclass WIFIEncryptionType(Enum):\n ENone = 'None'\n Any = 'Any'\n WPA2 = 'WPA2'\n WPA = '"
},
{
"path": "commandment/signals.py",
"chars": 538,
"preview": "from blinker import Namespace\nsignals = Namespace()\n\n# Sent when a device enrolls for the first time, or re-enrols after"
},
{
"path": "commandment/static/.gitignore",
"chars": 37,
"preview": "app.js\n*.map\nfonts/*\ncss/*\nimages/*\n\n"
},
{
"path": "commandment/static/index.dev.html",
"chars": 308,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width"
},
{
"path": "commandment/static/index.html",
"chars": 341,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width"
},
{
"path": "commandment/storage/.gitignore",
"chars": 14,
"preview": "*\n!.gitignore\n"
},
{
"path": "commandment/templates/index.html",
"chars": 797,
"preview": "{# The URL that assets will be loaded from if running from webpack-dev-server #}\n{% set webpack_dev_url = 'https://local"
},
{
"path": "commandment/threads/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "commandment/threads/startup_thread.py",
"chars": 4528,
"preview": "\"\"\"\nThis thread should run delayed, once at startup to initialise the internal CA and self-signed certificates to provid"
},
{
"path": "commandment/threads/vpp_thread.py",
"chars": 57,
"preview": "\"\"\"\nThis thread should synchronise available licenses\n\"\"\""
},
{
"path": "commandment/utils.py",
"chars": 662,
"preview": "from flask import current_app\nimport plistlib\n\n\ndef plistify(*args, **kwargs):\n \"\"\"Similar to jsonify, which ships wi"
},
{
"path": "commandment/vpp/__init__.py",
"chars": 373,
"preview": "from flask import g, current_app\n\nfrom commandment.vpp.errors import VPPError\nfrom commandment.vpp.vpp import VPP\n\n\ndef "
},
{
"path": "commandment/vpp/app.py",
"chars": 1572,
"preview": "from flask import Blueprint, jsonify, g, current_app, request, abort\nfrom flask_rest_jsonapi import Api\nfrom commandment"
},
{
"path": "commandment/vpp/cli.py",
"chars": 0,
"preview": ""
},
{
"path": "commandment/vpp/decorators.py",
"chars": 607,
"preview": "import functools\n\nfrom commandment.vpp.errors import VPPAPIError\n\n\ndef raise_error_replies(f):\n \"\"\"Decorator which wr"
},
{
"path": "commandment/vpp/enum.py",
"chars": 2160,
"preview": "from typing import Tuple\nfrom enum import Enum, IntEnum\n\n\nclass VPPPricingParam(Enum):\n \"\"\"Valid values for the VPP p"
},
{
"path": "commandment/vpp/errors.py",
"chars": 1797,
"preview": "from enum import IntEnum\n\n\nclass VPPErrorType(IntEnum):\n \"\"\"An enumeration representation of all (currently) possible"
},
{
"path": "commandment/vpp/models.py",
"chars": 2199,
"preview": "from ..dbtypes import GUID, JSONEncodedDict\nfrom .enum import VPPUserStatus, VPPPricingParam, VPPProductType\n\nfrom ..mod"
},
{
"path": "commandment/vpp/schema.py",
"chars": 137,
"preview": "from marshmallow import Schema, fields\n\n\nclass VPPAccountSchema(Schema):\n exp_date = fields.DateTime()\n org_name ="
},
{
"path": "commandment/vpp/vpp.py",
"chars": 24753,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"\nVolume Purchase Programme Support\n\nTODO:\n - Not all error conditions are unit tested.\n "
},
{
"path": "doc/.gitignore",
"chars": 7,
"preview": "_build\n"
},
{
"path": "doc/Makefile",
"chars": 7626,
"preview": "# Makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS =\nSPHINXBUILD "
},
{
"path": "doc/_static/config/nginx-commandment.conf",
"chars": 1341,
"preview": "server {\n listen 7443 ssl;\n ssl_certificate /usr/local/commandment/server.crt;\n ssl_certificate_key /usr/local/comman"
},
{
"path": "doc/_static/config/uwsgi-commandment.ini",
"chars": 812,
"preview": "[uwsgi]\nbase = /usr/local/commandment\n\npythonpath = %(base)\nmodule = commandment:create_app()\n\nhome = /usr/local/command"
},
{
"path": "doc/_static/uml/checkin.puml",
"chars": 303,
"preview": "@startuml\nactor Device\nboundary MDM\nentity DeviceModel\n\nDevice -> MDM: Authenticate message\nMDM -> EnrollPolicy: Check w"
},
{
"path": "doc/_static/uml/commandqueue.puml",
"chars": 129,
"preview": "@startuml\nstart\n:device has commands;\n:at least one command is \"Queued\" status;\n:command does not have \"after\" date;\n\nen"
},
{
"path": "doc/_static/uml/models/Certificate.plantuml",
"chars": 863,
"preview": "@startuml\n\nskinparam defaultFontName Courier\n\nClass certificates {\n INTEGER ★ id \n"
},
{
"path": "doc/_static/uml/models/Command.plantuml",
"chars": 624,
"preview": "@startuml\n\nskinparam defaultFontName Courier\n\nClass commands {\n INTEGER ★ id \n INTEGER "
},
{
"path": "doc/_static/uml/models/InstalledApplication.plantuml",
"chars": 1106,
"preview": "@startuml\n\nskinparam defaultFontName Courier\n\nClass installed_applications {\n INTEGER ★ id "
},
{
"path": "doc/_static/uml/models/InstalledCertificate.plantuml",
"chars": 824,
"preview": "@startuml\n\nskinparam defaultFontName Courier\n\nClass installed_certificates {\n INTEGER ★ id "
}
]
// ... and 373 more files (download for full content)
About this extraction
This page contains the full source code of the cmdmnt/commandment GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 573 files (1.5 MB), approximately 412.7k tokens, and a symbol index with 1754 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.