Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
erp5
Commits
db634e5d
Commit
db634e5d
authored
Oct 04, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_certificate_authority: Improve security settings
parent
69915fad
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
2 deletions
+28
-2
bt5/erp5_certificate_authority/DocumentTemplateItem/portal_components/document.erp5.CaucaseConnector.py
...eItem/portal_components/document.erp5.CaucaseConnector.py
+4
-2
bt5/erp5_certificate_authority/PropertySheetTemplateItem/portal_property_sheets/CaucaseConnector/user_certificate_property.xml
...rty_sheets/CaucaseConnector/user_certificate_property.xml
+8
-0
bt5/erp5_certificate_authority/PropertySheetTemplateItem/portal_property_sheets/CaucaseConnector/user_certificate_request_reference_property.xml
...Connector/user_certificate_request_reference_property.xml
+8
-0
bt5/erp5_certificate_authority/PropertySheetTemplateItem/portal_property_sheets/CaucaseConnector/user_key_property.xml
...al_property_sheets/CaucaseConnector/user_key_property.xml
+8
-0
No files found.
bt5/erp5_certificate_authority/DocumentTemplateItem/portal_components/document.erp5.CaucaseConnector.py
View file @
db634e5d
...
...
@@ -78,7 +78,7 @@ class CaucaseConnector(XMLObject):
return
self
.
_getConnection
(
user_key
=
user_key_file
.
name
)
security
.
declareP
ublic
(
'bootstrapCaucaseConfiguration'
)
security
.
declareP
rotected
(
Permissions
.
ManageUsers
,
'bootstrapCaucaseConfiguration'
)
def
bootstrapCaucaseConfiguration
(
self
):
if
self
.
getUserCertificate
()
is
None
:
caucase_connection
=
self
.
_getConnection
(
mode
=
"user"
)
...
...
@@ -103,7 +103,6 @@ class CaucaseConnector(XMLObject):
else
:
self
.
setUserCertificate
(
crt_pem
)
def
_getSubjectNameAttributeList
(
self
):
crt_pem
=
None
#self.getUserCertificate()
if
crt_pem
is
None
:
...
...
@@ -154,12 +153,15 @@ class CaucaseConnector(XMLObject):
def
createCertificateSigningRequest
(
self
,
csr
):
return
self
.
_getConnection
().
createCertificateSigningRequest
(
csr
)
security
.
declareProtected
(
Permissions
.
ManageUsers
,
'createCertificate'
)
def
createCertificate
(
self
,
csr_id
,
template_csr
=
""
):
return
self
.
_getAuthenticatedConnection
().
createCertificate
(
csr_id
,
template_csr
)
security
.
declareProtected
(
Permissions
.
ManageUsers
,
'getCertificate'
)
def
getCertificate
(
self
,
csr_id
):
return
self
.
_getAuthenticatedConnection
().
getCertificate
(
csr_id
)
security
.
declareProtected
(
Permissions
.
ManageUsers
,
'revokeCertificate'
)
def
revokeCertificate
(
self
,
crt_pem
,
key_pem
=
None
):
if
key_pem
is
None
:
return
self
.
_getAuthenticatedConnection
().
revokeCertificate
(
crt_pem
)
...
...
bt5/erp5_certificate_authority/PropertySheetTemplateItem/portal_property_sheets/CaucaseConnector/user_certificate_property.xml
View file @
db634e5d
...
...
@@ -24,6 +24,14 @@
<key>
<string>
id
</string>
</key>
<value>
<string>
user_certificate_property
</string>
</value>
</item>
<item>
<key>
<string>
read_permission
</string>
</key>
<value>
<string>
Manage users
</string>
</value>
</item>
<item>
<key>
<string>
write_permission
</string>
</key>
<value>
<string>
Manage users
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
...
...
bt5/erp5_certificate_authority/PropertySheetTemplateItem/portal_property_sheets/CaucaseConnector/user_certificate_request_reference_property.xml
View file @
db634e5d
...
...
@@ -24,6 +24,14 @@
<key>
<string>
id
</string>
</key>
<value>
<string>
user_certificate_request_reference_property
</string>
</value>
</item>
<item>
<key>
<string>
read_permission
</string>
</key>
<value>
<string>
Manage users
</string>
</value>
</item>
<item>
<key>
<string>
write_permission
</string>
</key>
<value>
<string>
Manage users
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
...
...
bt5/erp5_certificate_authority/PropertySheetTemplateItem/portal_property_sheets/CaucaseConnector/user_key_property.xml
View file @
db634e5d
...
...
@@ -24,6 +24,14 @@
<key>
<string>
id
</string>
</key>
<value>
<string>
user_key_property
</string>
</value>
</item>
<item>
<key>
<string>
read_permission
</string>
</key>
<value>
<string>
Manage users
</string>
</value>
</item>
<item>
<key>
<string>
write_permission
</string>
</key>
<value>
<string>
Manage users
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment