synapse 2.178.0__py311-none-any.whl → 2.180.0__py311-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of synapse might be problematic. Click here for more details.

Files changed (62) hide show
  1. synapse/cortex.py +166 -31
  2. synapse/datamodel.py +47 -1
  3. synapse/exc.py +1 -0
  4. synapse/lib/aha.py +2 -1
  5. synapse/lib/ast.py +110 -76
  6. synapse/lib/base.py +12 -3
  7. synapse/lib/cell.py +150 -11
  8. synapse/lib/coro.py +14 -0
  9. synapse/lib/drive.py +551 -0
  10. synapse/lib/layer.py +1 -1
  11. synapse/lib/lmdbslab.py +2 -0
  12. synapse/lib/modelrev.py +5 -1
  13. synapse/lib/node.py +14 -4
  14. synapse/lib/schemas.py +97 -0
  15. synapse/lib/snap.py +36 -11
  16. synapse/lib/storm.py +9 -5
  17. synapse/lib/stormhttp.py +1 -0
  18. synapse/lib/stormlib/modelext.py +29 -3
  19. synapse/lib/stormlib/stix.py +44 -17
  20. synapse/lib/stormlib/vault.py +2 -2
  21. synapse/lib/stormtypes.py +1 -1
  22. synapse/lib/types.py +9 -0
  23. synapse/lib/version.py +2 -2
  24. synapse/lookup/pe.py +303 -38
  25. synapse/models/auth.py +2 -0
  26. synapse/models/dns.py +24 -1
  27. synapse/models/geopol.py +3 -0
  28. synapse/models/geospace.py +4 -1
  29. synapse/models/inet.py +1 -0
  30. synapse/models/infotech.py +135 -92
  31. synapse/models/person.py +5 -2
  32. synapse/models/telco.py +3 -0
  33. synapse/tests/test_cortex.py +45 -1
  34. synapse/tests/test_lib_aha.py +17 -0
  35. synapse/tests/test_lib_ast.py +231 -0
  36. synapse/tests/test_lib_cell.py +225 -0
  37. synapse/tests/test_lib_coro.py +12 -0
  38. synapse/tests/test_lib_layer.py +22 -0
  39. synapse/tests/test_lib_modelrev.py +7 -0
  40. synapse/tests/test_lib_node.py +12 -1
  41. synapse/tests/test_lib_storm.py +32 -7
  42. synapse/tests/test_lib_stormhttp.py +40 -0
  43. synapse/tests/test_lib_stormlib_modelext.py +55 -3
  44. synapse/tests/test_lib_stormlib_stix.py +15 -0
  45. synapse/tests/test_lib_stormlib_vault.py +11 -1
  46. synapse/tests/test_lib_stormtypes.py +5 -0
  47. synapse/tests/test_lib_types.py +9 -0
  48. synapse/tests/test_model_dns.py +8 -0
  49. synapse/tests/test_model_geopol.py +2 -0
  50. synapse/tests/test_model_geospace.py +3 -1
  51. synapse/tests/test_model_inet.py +10 -1
  52. synapse/tests/test_model_infotech.py +47 -0
  53. synapse/tests/test_model_person.py +2 -0
  54. synapse/tests/test_model_syn.py +11 -0
  55. synapse/tests/test_model_telco.py +2 -1
  56. synapse/tests/test_utils_stormcov.py +1 -1
  57. synapse/tools/changelog.py +28 -0
  58. {synapse-2.178.0.dist-info → synapse-2.180.0.dist-info}/METADATA +1 -1
  59. {synapse-2.178.0.dist-info → synapse-2.180.0.dist-info}/RECORD +62 -61
  60. {synapse-2.178.0.dist-info → synapse-2.180.0.dist-info}/WHEEL +1 -1
  61. {synapse-2.178.0.dist-info → synapse-2.180.0.dist-info}/LICENSE +0 -0
  62. {synapse-2.178.0.dist-info → synapse-2.180.0.dist-info}/top_level.txt +0 -0
@@ -757,30 +757,37 @@ class ItModule(s_module.CoreModule):
757
757
  'doc': 'A developer selected label.',
758
758
  }),
759
759
  ('it:dev:repo', ('guid', {}), {
760
+ 'interfaces': ('inet:service:object',),
760
761
  'doc': 'A version control system instance.',
761
762
  }),
762
763
  ('it:dev:repo:remote', ('guid', {}), {
763
764
  'doc': 'A remote repo that is tracked for changes/branches/etc.',
764
765
  }),
765
766
  ('it:dev:repo:branch', ('guid', {}), {
767
+ 'interfaces': ('inet:service:object',),
766
768
  'doc': 'A branch in a version control system instance.',
767
769
  }),
768
770
  ('it:dev:repo:commit', ('guid', {}), {
771
+ 'interfaces': ('inet:service:object',),
769
772
  'doc': 'A commit to a repository.',
770
773
  }),
771
774
  ('it:dev:repo:diff', ('guid', {}), {
772
775
  'doc': 'A diff of a file being applied in a single commit.',
773
776
  }),
774
777
  ('it:dev:repo:issue:label', ('guid', {}), {
778
+ 'interfaces': ('inet:service:object',),
775
779
  'doc': 'A label applied to a repository issue.',
776
780
  }),
777
781
  ('it:dev:repo:issue', ('guid', {}), {
782
+ 'interfaces': ('inet:service:object',),
778
783
  'doc': 'An issue raised in a repository.',
779
784
  }),
780
785
  ('it:dev:repo:issue:comment', ('guid', {}), {
786
+ 'interfaces': ('inet:service:object',),
781
787
  'doc': 'A comment on an issue in a repository.',
782
788
  }),
783
789
  ('it:dev:repo:diff:comment', ('guid', {}), {
790
+ 'interfaces': ('inet:service:object',),
784
791
  'doc': 'A comment on a diff in a repository.',
785
792
  }),
786
793
  ('it:prod:soft', ('guid', {}), {
@@ -983,6 +990,9 @@ class ItModule(s_module.CoreModule):
983
990
  ('it:app:yara:match', ('comp', {'fields': (('rule', 'it:app:yara:rule'), ('file', 'file:bytes'))}), {
984
991
  'doc': 'A YARA rule match to a file.',
985
992
  }),
993
+ ('it:app:yara:netmatch', ('guid', {}), {
994
+ 'doc': 'An instance of a YARA rule network hunting match.',
995
+ }),
986
996
  ('it:app:yara:procmatch', ('guid', {}), {
987
997
  'doc': 'An instance of a YARA rule match to a process.',
988
998
  }),
@@ -1797,21 +1807,22 @@ class ItModule(s_module.CoreModule):
1797
1807
  }),
1798
1808
  ('desc', ('str', {}), {
1799
1809
  'disp': {'hint': 'text'},
1800
- 'doc': 'A free-form description of the repository.',
1801
- }),
1810
+ 'doc': 'A free-form description of the repository.'}),
1811
+
1802
1812
  ('created', ('time', {}), {
1803
- 'doc': 'When the repository was created.',
1804
- }),
1813
+ 'deprecated': True,
1814
+ 'doc': 'Deprecated. Please use :period.'}),
1815
+
1805
1816
  ('url', ('inet:url', {}), {
1806
- 'doc': 'A URL where the repository is hosted.',
1807
- }),
1817
+ 'doc': 'The URL where the repository is hosted.'}),
1818
+
1808
1819
  ('type', ('it:dev:repo:type:taxonomy', {}), {
1809
1820
  'doc': 'The type of the version control system used.',
1810
- 'ex': 'svn'
1811
- }),
1821
+ 'ex': 'svn'}),
1822
+
1812
1823
  ('submodules', ('array', {'type': 'it:dev:repo:commit'}), {
1813
- 'doc': "An array of other repos that this repo has as submodules, pinned at specific commits.",
1814
- }),
1824
+ 'doc': "An array of other repos that this repo has as submodules, pinned at specific commits."}),
1825
+
1815
1826
  )),
1816
1827
 
1817
1828
  ('it:dev:repo:remote', {}, (
@@ -1831,120 +1842,127 @@ class ItModule(s_module.CoreModule):
1831
1842
  )),
1832
1843
 
1833
1844
  ('it:dev:repo:branch', {}, (
1845
+
1834
1846
  ('parent', ('it:dev:repo:branch', {}), {
1835
- 'doc': 'The branch this branch was branched from.',
1836
- }),
1847
+ 'doc': 'The branch this branch was branched from.'}),
1848
+
1837
1849
  ('start', ('it:dev:repo:commit', {}), {
1838
- 'doc': 'The commit in the parent branch this branch was created at.'
1839
- }),
1850
+ 'doc': 'The commit in the parent branch this branch was created at.'}),
1851
+
1840
1852
  ('name', ('str', {'strip': True}), {
1841
- 'doc': 'The name of the branch.',
1842
- }),
1853
+ 'doc': 'The name of the branch.'}),
1854
+
1843
1855
  ('url', ('inet:url', {}), {
1844
- 'doc': 'The URL where the branch is hosted.',
1845
- }),
1856
+ 'doc': 'The URL where the branch is hosted.'}),
1857
+
1846
1858
  ('created', ('time', {}), {
1847
- 'doc': 'The time this branch was created',
1848
- }),
1859
+ 'deprecated': True,
1860
+ 'doc': 'Deprecated. Please use :period.'}),
1861
+
1849
1862
  ('merged', ('time', {}), {
1850
- 'doc': 'The time this branch was merged back into its parent.',
1851
- }),
1863
+ 'doc': 'The time this branch was merged back into its parent.'}),
1864
+
1852
1865
  ('deleted', ('time', {}), {
1853
- 'doc': 'The time this branch was deleted.',
1854
- }),
1866
+ 'deprecated': True,
1867
+ 'doc': 'Deprecated. Please use :period.'}),
1855
1868
  )),
1856
1869
 
1857
1870
  ('it:dev:repo:commit', {}, (
1858
1871
  ('repo', ('it:dev:repo', {}), {
1859
- 'doc': 'The repository the commit lives in.',
1860
- }),
1872
+ 'doc': 'The repository the commit lives in.'}),
1873
+
1861
1874
  ('parents', ('array', {'type': 'it:dev:repo:commit'}), {
1862
- 'doc': 'The commit or commits this commit is immediately based on.',
1863
- }),
1875
+ 'doc': 'The commit or commits this commit is immediately based on.'}),
1876
+
1864
1877
  ('branch', ('it:dev:repo:branch', {}), {
1865
- 'doc': 'The name of the branch the commit was made to.',
1866
- }),
1878
+ 'doc': 'The name of the branch the commit was made to.'}),
1879
+
1867
1880
  ('mesg', ('str', {}), {
1868
1881
  'disp': {'hint': 'text'},
1869
- 'doc': 'The commit message describing the changes in the commit.',
1870
- }),
1882
+ 'doc': 'The commit message describing the changes in the commit.'}),
1883
+
1871
1884
  ('id', ('str', {}), {
1872
- 'doc': 'The version control system specific commit identifier.',
1873
- }),
1885
+ 'doc': 'The version control system specific commit identifier.'}),
1886
+
1874
1887
  ('created', ('time', {}), {
1875
- 'doc': 'The time the commit was made.',
1876
- }),
1888
+ 'deprecated': True,
1889
+ 'doc': 'Deprecated. Please use :period.'}),
1890
+
1877
1891
  ('url', ('inet:url', {}), {
1878
- 'doc': 'The URL where the commit is hosted.',
1879
- }),
1892
+ 'doc': 'The URL where the commit is hosted.'}),
1880
1893
  )),
1881
1894
 
1882
1895
  ('it:dev:repo:diff', {}, (
1896
+
1883
1897
  ('commit', ('it:dev:repo:commit', {}), {
1884
- 'doc': 'The commit that produced this diff.',
1885
- }),
1898
+ 'doc': 'The commit that produced this diff.'}),
1899
+
1886
1900
  ('file', ('file:bytes', {}), {
1887
- 'doc': 'The file after the commit has been applied',
1888
- }),
1901
+ 'doc': 'The file after the commit has been applied'}),
1902
+
1889
1903
  ('path', ('file:path', {}), {
1890
- 'doc': 'The path to the file in the repo that the diff is being applied to.',
1891
- }),
1904
+ 'doc': 'The path to the file in the repo that the diff is being applied to.'}),
1905
+
1892
1906
  ('url', ('inet:url', {}), {
1893
- 'doc': 'The URL where the diff is hosted.',
1894
- }),
1907
+ 'doc': 'The URL where the diff is hosted.'}),
1895
1908
  )),
1896
1909
 
1897
1910
  ('it:dev:repo:issue', {}, (
1911
+
1898
1912
  ('repo', ('it:dev:repo', {}), {
1899
- 'doc': 'The repo where the issue was logged.',
1900
- }),
1913
+ 'doc': 'The repo where the issue was logged.'}),
1914
+
1901
1915
  ('title', ('str', {'lower': True, 'strip': True}), {
1902
- 'doc': 'The title of the issue.'
1903
- }),
1916
+ 'doc': 'The title of the issue.'}),
1917
+
1904
1918
  ('desc', ('str', {}), {
1905
1919
  'disp': {'hint': 'text'},
1906
- 'doc': 'The text describing the issue.'
1907
- }),
1920
+ 'doc': 'The text describing the issue.'}),
1921
+
1908
1922
  ('created', ('time', {}), {
1909
- 'doc': 'The time the issue was created.',
1910
- }),
1923
+ 'deprecated': True,
1924
+ 'doc': 'Deprecated. Please use :period.'}),
1925
+
1911
1926
  ('updated', ('time', {}), {
1912
- 'doc': 'The time the issue was updated.',
1913
- }),
1927
+ 'doc': 'The time the issue was updated.'}),
1928
+
1914
1929
  ('url', ('inet:url', {}), {
1915
- 'doc': 'The URL where the issue is hosted.',
1916
- }),
1930
+ 'doc': 'The URL where the issue is hosted.'}),
1931
+
1917
1932
  ('id', ('str', {'strip': True}), {
1918
- 'doc': 'The ID of the issue in the repository system.',
1919
- }),
1933
+ 'doc': 'The ID of the issue in the repository system.'}),
1920
1934
  )),
1921
1935
 
1922
1936
  ('it:dev:repo:label', {}, (
1937
+
1923
1938
  ('id', ('str', {'strip': True}), {
1924
- 'doc': 'The ID of the label.',
1925
- }),
1939
+ 'doc': 'The ID of the label.'}),
1940
+
1926
1941
  ('title', ('str', {'lower': True, 'strip': True}), {
1927
- 'doc': 'The human friendly name of the label.',
1928
- }),
1942
+ 'doc': 'The human friendly name of the label.'}),
1943
+
1929
1944
  ('desc', ('str', {}), {
1930
1945
  'disp': {'hint': 'text'},
1931
- 'doc': 'The description of the label.',
1932
- }),
1946
+ 'doc': 'The description of the label.'}),
1947
+
1933
1948
  )),
1934
1949
 
1935
1950
  ('it:dev:repo:issue:label', {}, (
1951
+
1936
1952
  ('issue', ('it:dev:repo:issue', {}), {
1937
- 'doc': 'The issue the label was applied to.',
1938
- }),
1953
+ 'doc': 'The issue the label was applied to.'}),
1954
+
1939
1955
  ('label', ('it:dev:repo:label', {}), {
1940
- 'doc': 'The label that was applied to the issue.',
1941
- }),
1956
+ 'doc': 'The label that was applied to the issue.'}),
1957
+
1942
1958
  ('applied', ('time', {}), {
1943
- 'doc': 'The time the label was applied.',
1944
- }),
1959
+ 'deprecated': True,
1960
+ 'doc': 'Deprecated. Please use :period.'}),
1961
+
1945
1962
  ('removed', ('time', {}), {
1946
- 'doc': 'The time the label was removed.',
1947
- }),
1963
+ 'deprecated': True,
1964
+ 'doc': 'Deprecated. Please use :period.'}),
1965
+
1948
1966
  )),
1949
1967
 
1950
1968
  ('it:dev:repo:issue:comment', {}, (
@@ -1962,7 +1980,8 @@ class ItModule(s_module.CoreModule):
1962
1980
  'doc': 'The URL where the comment is hosted.',
1963
1981
  }),
1964
1982
  ('created', ('time', {}), {
1965
- 'doc': 'The time the comment was created.',
1983
+ 'deprecated': True,
1984
+ 'doc': 'Deprecated. Please use :period.',
1966
1985
  }),
1967
1986
  ('updated', ('time', {}), {
1968
1987
  'doc': 'The time the comment was updated.',
@@ -1970,31 +1989,33 @@ class ItModule(s_module.CoreModule):
1970
1989
  )),
1971
1990
 
1972
1991
  ('it:dev:repo:diff:comment', {}, (
1992
+
1973
1993
  ('diff', ('it:dev:repo:diff', {}), {
1974
- 'doc': 'The diff the comment is being added to.',
1975
- }),
1994
+ 'doc': 'The diff the comment is being added to.'}),
1995
+
1976
1996
  ('text', ('str', {}), {
1977
1997
  'disp': {'hint': 'text'},
1978
- 'doc': 'The body of the comment.',
1979
- }),
1998
+ 'doc': 'The body of the comment.'}),
1999
+
1980
2000
  ('replyto', ('it:dev:repo:diff:comment', {}), {
1981
- 'doc': 'The comment that this comment is replying to.',
1982
- }),
2001
+ 'doc': 'The comment that this comment is replying to.'}),
2002
+
1983
2003
  ('line', ('int', {}), {
1984
- 'doc': 'The line in the file that is being commented on.',
1985
- }),
2004
+ 'doc': 'The line in the file that is being commented on.'}),
2005
+
1986
2006
  ('offset', ('int', {}), {
1987
- 'doc': 'The offset in the line in the file that is being commented on.',
1988
- }),
2007
+ 'doc': 'The offset in the line in the file that is being commented on.'}),
2008
+
1989
2009
  ('url', ('inet:url', {}), {
1990
- 'doc': 'The URL where the comment is hosted.',
1991
- }),
2010
+ 'doc': 'The URL where the comment is hosted.'}),
2011
+
1992
2012
  ('created', ('time', {}), {
1993
- 'doc': 'The time the comment was created.',
1994
- }),
2013
+ 'deprecated': True,
2014
+ 'doc': 'Deprecated. Please use :period.'}),
2015
+
1995
2016
  ('updated', ('time', {}), {
1996
- 'doc': 'The time the comment was updated.',
1997
- }),
2017
+ 'doc': 'The time the comment was updated.'}),
2018
+
1998
2019
  )),
1999
2020
 
2000
2021
  ('it:prod:hardwaretype', {}, ()),
@@ -2991,14 +3012,27 @@ class ItModule(s_module.CoreModule):
2991
3012
  'doc': 'The STIX id field from the indicator pattern.'}),
2992
3013
  ('name', ('str', {}), {
2993
3014
  'doc': 'The name of the STIX indicator pattern.'}),
3015
+ ('confidence', ('int', {'min': 0, 'max': 100}), {
3016
+ 'doc': 'The confidence field from the STIX indicator.'}),
3017
+ ('revoked', ('bool', {}), {
3018
+ 'doc': 'The revoked field from the STIX indicator.'}),
3019
+ ('description', ('str', {}), {
3020
+ 'doc': 'The description field from the STIX indicator.'}),
2994
3021
  ('pattern', ('str', {}), {
2995
3022
  'doc': 'The STIX indicator pattern text.'}),
3023
+ ('pattern_type', ('str', {'strip': True, 'lower': True,
3024
+ 'enums': 'stix,pcre,sigma,snort,suricata,yara'}), {
3025
+ 'doc': 'The STIX indicator pattern type.'}),
2996
3026
  ('created', ('time', {}), {
2997
3027
  'doc': 'The time that the indicator pattern was first created.'}),
2998
3028
  ('updated', ('time', {}), {
2999
3029
  'doc': 'The time that the indicator pattern was last modified.'}),
3000
3030
  ('labels', ('array', {'type': 'str', 'uniq': True, 'sorted': True}), {
3001
3031
  'doc': 'The label strings embedded in the STIX indicator pattern.'}),
3032
+ ('valid_from', ('time', {}), {
3033
+ 'doc': 'The valid_from field from the STIX indicator.'}),
3034
+ ('valid_until', ('time', {}), {
3035
+ 'doc': 'The valid_until field from the STIX indicator.'}),
3002
3036
  )),
3003
3037
 
3004
3038
  ('it:app:yara:rule', {}, (
@@ -3046,9 +3080,18 @@ class ItModule(s_module.CoreModule):
3046
3080
  'doc': 'The most recent version of the rule evaluated as a match.'}),
3047
3081
  )),
3048
3082
 
3083
+ ('it:app:yara:netmatch', {}, (
3084
+ ('rule', ('it:app:yara:rule', {}), {
3085
+ 'doc': 'The YARA rule that triggered the match.'}),
3086
+ ('version', ('it:semver', {}), {
3087
+ 'doc': 'The most recent version of the rule evaluated as a match.'}),
3088
+ ('node', ('ndef', {'forms': ('inet:fqdn', 'inet:ipv4', 'inet:ipv6', 'inet:url')}), {
3089
+ 'doc': 'The node which matched the rule.'}),
3090
+ )),
3091
+
3049
3092
  ('it:app:yara:procmatch', {}, (
3050
3093
  ('rule', ('it:app:yara:rule', {}), {
3051
- 'doc': 'The YARA rule that matched the file.'}),
3094
+ 'doc': 'The YARA rule that matched the process.'}),
3052
3095
  ('proc', ('it:exec:proc', {}), {
3053
3096
  'doc': 'The process that matched the YARA rule.'}),
3054
3097
  ('time', ('time', {}), {
synapse/models/person.py CHANGED
@@ -371,8 +371,11 @@ class PsModule(s_module.CoreModule):
371
371
  'doc': 'The listed org/company FQDN for this contact.',
372
372
  }),
373
373
  ('user', ('inet:user', {}), {
374
- 'doc': 'The username or handle for this contact.',
375
- }),
374
+ 'doc': 'The username or handle for this contact.'}),
375
+
376
+ ('service:accounts', ('array', {'type': 'inet:service:account', 'sorted': True, 'uniq': True}), {
377
+ 'doc': 'The service accounts associated with this contact.'}),
378
+
376
379
  ('web:acct', ('inet:web:acct', {}), {
377
380
  'doc': 'The social media account for this contact.',
378
381
  }),
synapse/models/telco.py CHANGED
@@ -378,6 +378,9 @@ class TelcoModule(s_module.CoreModule):
378
378
  ('email', ('inet:email', {}), {}),
379
379
  ('acct', ('inet:web:acct', {}), {}),
380
380
 
381
+ ('account', ('inet:service:account', {}), {
382
+ 'doc': 'The service account which is associated with the tracked device.'}),
383
+
381
384
  # reporting related data
382
385
  ('app', ('it:prod:softver', {}), {}),
383
386
 
@@ -41,6 +41,50 @@ class CortexTest(s_t_utils.SynTest):
41
41
  '''
42
42
  The tests that should be run with different types of layers
43
43
  '''
44
+ async def test_cortex_basics(self):
45
+
46
+ with self.getTestDir() as dirn:
47
+
48
+ async with self.getTestCore(dirn=dirn) as core:
49
+
50
+ with self.raises(s_exc.NoSuchProp):
51
+ await core.setPropLocked('newp', True)
52
+
53
+ with self.raises(s_exc.NoSuchUniv):
54
+ await core.setUnivLocked('newp', True)
55
+
56
+ with self.raises(s_exc.NoSuchTagProp):
57
+ await core.setTagPropLocked('newp', True)
58
+
59
+ await core.addTagProp('score', ('int', {}), {})
60
+
61
+ await core.setPropLocked('inet:ipv4:asn', True)
62
+ await core.setUnivLocked('.seen', True)
63
+ await core.setTagPropLocked('score', True)
64
+
65
+ with self.raises(s_exc.IsDeprLocked):
66
+ await core.nodes('[ inet:ipv4=1.2.3.4 :asn=99 ]')
67
+ with self.raises(s_exc.IsDeprLocked):
68
+ await core.nodes('[ inet:ipv4=1.2.3.4 .seen=now ]')
69
+ with self.raises(s_exc.IsDeprLocked):
70
+ await core.nodes('[ inet:ipv4=1.2.3.4 +#foo:score=10 ]')
71
+
72
+ # test persistence...
73
+ async with self.getTestCore(dirn=dirn) as core:
74
+
75
+ with self.raises(s_exc.IsDeprLocked):
76
+ await core.nodes('[ inet:ipv4=1.2.3.4 :asn=99 ]')
77
+ with self.raises(s_exc.IsDeprLocked):
78
+ await core.nodes('[ inet:ipv4=1.2.3.4 .seen=now ]')
79
+ with self.raises(s_exc.IsDeprLocked):
80
+ await core.nodes('[ inet:ipv4=1.2.3.4 +#foo:score=10 ]')
81
+
82
+ await core.setPropLocked('inet:ipv4:asn', False)
83
+ await core.setUnivLocked('.seen', False)
84
+ await core.setTagPropLocked('score', False)
85
+
86
+ await core.nodes('[ inet:ipv4=1.2.3.4 :asn=99 .seen=now +#foo:score=10 ]')
87
+
44
88
  async def test_cortex_cellguid(self):
45
89
  iden = s_common.guid()
46
90
  conf = {'cell:guid': iden}
@@ -1302,7 +1346,7 @@ class CortexTest(s_t_utils.SynTest):
1302
1346
 
1303
1347
  await core.delTagProp('score')
1304
1348
 
1305
- with self.raises(s_exc.NoSuchProp):
1349
+ with self.raises(s_exc.NoSuchTagProp):
1306
1350
  await core.delTagProp('score')
1307
1351
 
1308
1352
  modl = await core.getModelDict()
@@ -1292,3 +1292,20 @@ class AhaTest(s_test.SynTest):
1292
1292
  async with await s_cell.Cell.anit(dirn=clldir, conf=cllconf) as cell:
1293
1293
  self.none(await cell.ahaclient.waitready(timeout=12))
1294
1294
  self.eq(cell.conf.get('aha:registry'), ahaurl)
1295
+
1296
+ async def test_aha_provision_listen_dns_name(self):
1297
+ # Ensure that we use the dns:name for the provisioning listener when
1298
+ # the provision:listen value is not provided.
1299
+ conf = {
1300
+ 'aha:network': 'synapse',
1301
+ 'dns:name': 'here.loop.vertex.link',
1302
+ }
1303
+ mesg = 'provision listening: ssl://0.0.0.0:27272?hostname=here.loop.vertex.link'
1304
+ with self.getAsyncLoggerStream('synapse.lib.aha', mesg) as stream:
1305
+ async with self.getTestCell(s_aha.AhaCell, conf=conf) as aha:
1306
+ self.true(await stream.wait(timeout=6))
1307
+ # And the URL works with our listener :)
1308
+ provurl = await aha.addAhaUserEnroll('bob.grey')
1309
+ async with await s_telepath.openurl(provurl) as prox:
1310
+ info = await prox.getUserInfo()
1311
+ self.eq(info.get('aha:user'), 'bob.grey')