Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feature(rules): retrieve user extended data using win32 API #494

Merged
merged 6 commits into from
Apr 24, 2024

Conversation

Guts
Copy link
Owner

@Guts Guts commented Apr 24, 2024

This PR follows the 0.34 release to extend information when QDT is run in a Windows domain. Sample output:

{
    "date": {
        "current_day": 24,
        "current_month": 4,
        "current_weekday": 2,
        "current_year": 2024
    },
    "environment": {
        "computer_network_name": "VM200145",
        "linux_distribution_name": null,
        "linux_distribution_version": null,
        "operating_system_code": "win32",
        "operating_system_release": "10",
        "processor_architecture": "AMD64",
        "windows_edition": "Professional"
    },
    "user": {
        "groups_domain": [
            "GGD_FONC_HENRY-TMA",
            "GGD_ORGA_INTERVENANTS",
            "GGD_ORG_DG-HENRY_DES",
            "GGD_ORG_DG_TOUS",
            "GGD_SCM_PMAD-SI",
            "GGD_WIFI_AGENTS_TOUS",
            "GG_INSTALL_SAGE_EAU",
            "METROPOLIS_TOUS",
            "SITE_DOMICILE-BUREAU_SOCIETE_EXTERNE",
            "Tous_DDR",
            "Tous_HENRY",
            "Tous_HENRY_DINSI"
        ],
        "groups_local": [],
        "name": "ICHIGO",
        "windows_extended": {
            "NameCanonical": "bah.lady.glue/PERSONNES/METROPOLIS/HENRY/INTERVENANTS/ICHIGO",
            "NameCanonicalEx": "bah.lady.glue/PERSONNES/METROPOLIS/HENRY/INTERVENANTS\nICHIGO",
            "NameDisplay": "Julien M.",
            "NameDnsDomain": "bah.lady.glue\\ICHIGO",
            "NameFullyQualifiedDN": "CN=ICHIGO,OU=INTERVENANTS,OU=HENRY,OU=METROPOLIS,OU=PERSONNES,DC=ben,DC=oscar,DC=glue",
            "NameGivenName": "",
            "NameSamCompatible": "BEN\\ICHIGO",
            "NameServicePrincipal": "",
            "NameSurname": "",
            "NameUniqueId": "{123-2820-44s5b7-4654-5sbqeq5xcqx9qsbf}",
            "NameUnknown": "",
            "NameUserPrincipal": "ext.oslandia.julienm@tigre.com"
        }
    }
}

@Guts Guts self-assigned this Apr 24, 2024
@github-actions github-actions bot added the enhancement New feature or request label Apr 24, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 24, 2024

Codecov Report

Attention: Patch coverage is 42.85714% with 24 lines in your changes are missing coverage. Please review.

Project coverage is 67.14%. Comparing base (b7b2fac) to head (3592543).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #494      +/-   ##
==========================================
- Coverage   70.79%   67.14%   -3.66%     
==========================================
  Files          48       48              
  Lines        3054     3086      +32     
  Branches      654      657       +3     
==========================================
- Hits         2162     2072      -90     
- Misses        702      820     +118     
- Partials      190      194       +4     
Flag Coverage Δ
unittests 66.88% <42.85%> (-3.29%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
qgis_deployment_toolbelt/profiles/rules_context.py 95.00% <50.00%> (-5.00%) ⬇️
qgis_deployment_toolbelt/utils/win32utils.py 31.11% <69.56%> (-40.54%) ⬇️
qgis_deployment_toolbelt/utils/user_groups.py 32.07% <0.00%> (-29.32%) ⬇️

... and 4 files with indirect coverage changes

Copy link

sonarcloud bot commented Apr 24, 2024

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@Guts Guts merged commit a46ec90 into main Apr 24, 2024
24 of 25 checks passed
@Guts Guts deleted the feature/extend-windows-support-for-user-groups branch April 24, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants