Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klaus Wölfel
slapos.core
Commits
c607a4cf
Commit
c607a4cf
authored
Jun 19, 2017
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_web: form to generate certificate using caucase
parent
792059be
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1167 additions
and
22 deletions
+1167
-22
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_requestNewCertificate.py
...l_skins/vifib_hosting/WebSection_requestNewCertificate.py
+5
-4
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_requestNewCertificate.xml
..._skins/vifib_hosting/WebSection_requestNewCertificate.xml
+1
-1
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_requestNewComputerCertificate.py
...vifib_hosting/WebSection_requestNewComputerCertificate.py
+2
-2
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_requestNewComputerCertificate.xml
...ifib_hosting/WebSection_requestNewComputerCertificate.xml
+1
-1
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_revokeCertificate.py
...ortal_skins/vifib_hosting/WebSection_revokeCertificate.py
+2
-2
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewCertificateAsWeb.xml
...l_skins/vifib_hosting/WebSection_viewCertificateAsWeb.xml
+1
-1
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewCertificateAsWeb/your_certificate_url.xml
.../WebSection_viewCertificateAsWeb/your_certificate_url.xml
+272
-0
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewCertificateAsWeb/your_information.xml
...ting/WebSection_viewCertificateAsWeb/your_information.xml
+1
-1
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewCertificateRequestDialog.xml
...vifib_hosting/WebSection_viewCertificateRequestDialog.xml
+2
-0
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewCertificateRequestDialog/my_certificate_signature_request.xml
...ificateRequestDialog/my_certificate_signature_request.xml
+5
-5
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewCertificateRequestDialog/your_common_name.xml
...Section_viewCertificateRequestDialog/your_common_name.xml
+295
-0
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewCertificateRequestDialog/your_description.xml
...Section_viewCertificateRequestDialog/your_description.xml
+2
-4
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewComputerCertificateRequestDialog.xml
...sting/WebSection_viewComputerCertificateRequestDialog.xml
+2
-0
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewComputerCertificateRequestDialog/my_certificate_signature_request.xml
...ificateRequestDialog/my_certificate_signature_request.xml
+280
-0
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewComputerCertificateRequestDialog/your_common_name.xml
...viewComputerCertificateRequestDialog/your_common_name.xml
+295
-0
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewComputerCertificateRequestDialog/your_description.xml
...viewComputerCertificateRequestDialog/your_description.xml
+1
-1
No files found.
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_requestNewCertificate.py
View file @
c607a4cf
...
...
@@ -2,17 +2,18 @@ person = context.ERP5Site_getAuthenticatedMemberPersonValue()
request
=
context
.
REQUEST
response
=
request
.
RESPONSE
certificate
=
url
=
""
if
person
is
None
:
response
.
setStatus
(
403
)
else
:
try
:
_
,
url
=
person
.
signCertificate
(
certificate_signature_request
)
request
.
set
(
'portal_status_message'
,
context
.
Base_translateString
(
'New Certificate created.'
))
certificate
=
person
.
getCertificate
()
request
.
set
(
'portal_status_message'
,
context
.
Base_translateString
(
'Certificate created.'
))
except
ValueError
:
certificate
=
{
'certificate'
:
''
,
'key'
:
''
}
request
.
set
(
'portal_status_message'
,
context
.
Base_translateString
(
'Certificate was already requested, please revoke existing one.'
))
response
.
setStatus
(
403
)
request
.
set
(
'your_certificate'
,
certificate
[
'certificate'
]
)
request
.
set
(
'your_
key'
,
certificate
[
'key'
]
)
request
.
set
(
'your_certificate'
,
certificate
)
request
.
set
(
'your_
certificate_url'
,
url
)
return
context
.
WebSection_viewCertificateAsWeb
()
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_requestNewCertificate.xml
View file @
c607a4cf
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
*args
, **kwargs
</string>
</value>
<value>
<string>
certificate_signature_request
, **kwargs
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_requestNewComputerCertificate.py
View file @
c607a4cf
computer
=
context
request
=
context
.
REQUEST
try
:
computer
.
generateCertificate
()
computer
.
generateCertificate
(
csr
=
certificate_signature_request
)
request
.
set
(
'portal_status_message'
,
context
.
Base_translateString
(
'Certificate created.'
))
except
ValueError
:
request
.
set
(
'portal_status_message'
,
context
.
Base_translateString
(
'Certificate is still active, please revoke existing one.'
))
request
.
set
(
'your_certificate'
,
request
.
get
(
'computer_certificate'
))
request
.
set
(
'your_
key'
,
request
.
get
(
'computer_key
'
))
request
.
set
(
'your_
certificate_url'
,
request
.
get
(
'certificate_url
'
))
return
context
.
Computer_viewConnectionInformationAsWeb
()
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_requestNewComputerCertificate.xml
View file @
c607a4cf
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
form_id, *args, **kwargs
</string>
</value>
<value>
<string>
form_id,
certificate_signature_request,
*args, **kwargs
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_revokeCertificate.py
View file @
c607a4cf
...
...
@@ -2,7 +2,7 @@ person = context.ERP5Site_getAuthenticatedMemberPersonValue()
try
:
person
.
revokeCertificate
()
message
=
context
.
Base_translateString
(
'Certificate revoked.'
)
except
ValueError
:
message
=
context
.
Base_translateString
(
'No certificate found.
'
)
except
ValueError
,
e
:
message
=
context
.
Base_translateString
(
'No certificate found.
%s'
%
str
(
e
)
)
return
context
.
getWebSiteValue
().
myspace
.
my_account
.
Base_redirect
(
keep_items
=
dict
(
portal_status_message
=
message
))
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewCertificateAsWeb.xml
View file @
c607a4cf
...
...
@@ -87,7 +87,7 @@
<value>
<list>
<string>
your_information
</string>
<string>
your_
key
</string>
<string>
your_
certificate_url
</string>
<string>
your_certificate
</string>
</list>
</value>
...
...
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewCertificateAsWeb/your_certificate_url.xml
0 → 100644
View file @
c607a4cf
This diff is collapsed.
Click to expand it.
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewCertificateAsWeb/your_information.xml
View file @
c607a4cf
...
...
@@ -209,7 +209,7 @@
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string>
Please copy
and store in safe place certificate and key
.\n
<value>
<string>
Please copy
/download certificate and store in safe place
.\n
\n
You can use them with slap library, for example in slap console.
</string>
</value>
</item>
...
...
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewCertificateRequestDialog.xml
View file @
c607a4cf
...
...
@@ -87,6 +87,8 @@
<value>
<list>
<string>
your_description
</string>
<string>
my_certificate_signature_request
</string>
<string>
your_common_name
</string>
</list>
</value>
</item>
...
...
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewCertificate
AsWeb/your_key
.xml
→
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewCertificate
RequestDialog/my_certificate_signature_request
.xml
View file @
c607a4cf
...
...
@@ -8,7 +8,7 @@
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_key
</string>
</value>
<value>
<string>
my_certificate_signature_request
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
...
...
@@ -205,7 +205,7 @@
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string>
inline
</string>
</value>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
...
...
@@ -213,7 +213,7 @@
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
Put here the CSR string in PEM format
</string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
...
...
@@ -233,7 +233,7 @@
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<int>
1
0
</int>
</value>
<value>
<int>
1
5
</int>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
...
...
@@ -257,7 +257,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Key
</string>
</value>
<value>
<string>
Certificate Signature Request (CSR)
</string>
</value>
</item>
<item>
<key>
<string>
unicode
</string>
</key>
...
...
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewCertificateRequestDialog/your_common_name.xml
0 → 100644
View file @
c607a4cf
This diff is collapsed.
Click to expand it.
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewCertificateRequestDialog/your_description.xml
View file @
c607a4cf
...
...
@@ -209,13 +209,11 @@
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string>
Here you can request new SSL certificate.\n
\n
After presenting it please copy key and certificate and store in secure place.\n
<value>
<string>
Here you can request a signed SSL certificate.\n
\n
In case of certificate compromise or lost please request it again.\n
\n
Certificate is not stored on Vifib.net servers
</string>
</value>
Certificate is not stored on Vifib.net servers
.
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewComputerCertificateRequestDialog.xml
View file @
c607a4cf
...
...
@@ -87,6 +87,8 @@
<value>
<list>
<string>
your_description
</string>
<string>
my_certificate_signature_request
</string>
<string>
your_common_name
</string>
</list>
</value>
</item>
...
...
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewComputerCertificateRequestDialog/my_certificate_signature_request.xml
0 → 100644
View file @
c607a4cf
This diff is collapsed.
Click to expand it.
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewComputerCertificateRequestDialog/your_common_name.xml
0 → 100644
View file @
c607a4cf
This diff is collapsed.
Click to expand it.
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewComputerCertificateRequestDialog/your_description.xml
View file @
c607a4cf
...
...
@@ -211,7 +211,7 @@
<key>
<string>
default
</string>
</key>
<value>
<string>
Here you can request a new SSL certificate for computer.\n
\n
After presenting it please copy
key and
certificate and store in secure place.\n
After presenting it please copy
the
certificate and store in secure place.\n
\n
In case of certificate compromise or lost please request it again.\n
\n
...
...
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