119 Commits

Author SHA1 Message Date
Gayathri Devi Kathiri
b65988fa5c Modify Password validator related settings in Horizon
Add "enable_pwd_validator" variable to apply password
validator settings when enabled in horizon values.

Modify "PASSWORD_VALIDATOR" so as to enforce password
requirements i.e., password must be at least eight
characters in length and must include characters from
at least two of these groupings: alpha, numeric, and
special characters when "enable_pwd_validator" is enabled.

Change-Id: Ia866feb875490d0bb40e820c6c32ee2cb6aa4c29
2021-01-04 02:25:53 +00:00
Vasyl Saienko
d0bd3dbb50 [horizon] Allow to pass any setting to horizon local_settings.py
Change-Id: I164f3bb0af5d07af17490bd3d275c7b0fbadb0b9
2020-08-13 17:21:14 +00:00
Shuicheng Lin
67eefcf381 Correct limits and os-availability-zone's policy setting
In nova latest code, limits and os-availability-zone have been
updated to could be listed as any user by below patches:
limits: 4d37ffc111ae8bb43bd33fe995bc3686b065131b
os-availability-zone: b8c2de86ed46caf7768027e82519c2418989c36b
And target project id is set to {}. So user cannot be matched as
"owner", and lead to API access failure.
Update policy to be the same as latest nova code to avoid the error.

Change-Id: I3621be0fa42388180a7ac3e4bc7f7683a0c15b68
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
2020-08-03 13:48:58 +08:00
Zuul
1fd839139d Merge "Add missing security context to Horizon test pods/containers" 2020-07-16 18:53:46 +00:00
DODDA, PRATEEK REDDY (pd2839)
e61f88465a Add missing security context to Horizon test pods/containers
This updates the horizon chart to include the pod
security context on the pod template.

This also adds the container security context to set
readOnlyRootFilesystem flag to true

Change-Id: I2ccd920fa26aca2955afef8b71d56e55d1ae26e8
2020-07-15 22:26:41 +00:00
sgupta
702c17eb78 feat(tls): Make openstack services compatible with mariadb with TLS
Depends-on: https://review.opendev.org/#/c/741037/
Change-Id: I21f4ede3bd18c0af8da1eba60cd0b7b932a31410
2020-07-14 23:32:03 +00:00
Tin Lam
918a307427 feat(tls): add tls support to openstack services
This patch set enables TLS for the following OpenStack services: keystone,
horizon, glance, cinder, heat, nova, placement and neutron for s- (stein)
and t- (train) release. This serves as a consolidation and clean up patch
for the following patches:

[0] https://review.opendev.org/#/c/733291
[1] https://review.opendev.org/#/c/735202
[2] https://review.opendev.org/#/c/733962
[3] https://review.opendev.org/#/c/733404
[4] https://review.opendev.org/#/c/734896

This also addresses comments mentioned in previous patches.

Co-authored-by: Gage Hugo <gagehugo@gmail.com>
Co-authored-by: sgupta <sg774j@att.com>

Depends-on: https://review.opendev.org/#/c/737194/

Change-Id: Id34ace54298660b4b151522916e929a29f5731be
Signed-off-by: Tin Lam <tin@irrational.io>
2020-07-10 09:36:31 -05:00
Tin Lam
d122223214 fix(security): update horizon setting
This patch set updates some default horizon settings to be more secured.

Change-Id: I7849cb0e9819d9e5cf4e149634e2bebee75a1c7f
Signed-off-by: Tin Lam <tin@irrational.io>
2020-06-05 12:25:53 -05:00
Andrii Ostapenko
8cfa2aa390 Enable yamllint checks
- brackets
- braces
- colon
- commas
- comments
- document-end
- document-start
- empty-lines
- hyphens
- indentation
- new-line-at-end-of-file
- new-lines
- octal-values
- trailing-spaces

with corresponding code adjustment.

Also add yamllint.conf under the check.

Change-Id: Ie6251c9063c9c99ebe7c6db54c65d45d6ee7a1d4
2020-05-27 19:16:34 -05:00
Roman Gorshunov
32c7a6cdd4 Add Project Specific Contributor and PTL Docs
This patch amends contributor guidelines for the Ussuri goals.

Change-Id: I9207d02a386e1250963b378bd9fd2188d78a613e
Task: 38545
Story: 2007236
2020-04-24 20:57:28 +02:00
Gage Hugo
db79e79788 Remove OSH Authors copyright
The current copyright refers to a non-existent group
"openstack helm authors" with often out-of-date references that
are confusing when adding a new file to the repo.

This change removes all references to this copyright by the
non-existent group and any blank lines underneath.

Change-Id: Ia035037e000f1bf95202fc07b8cd1ad0fc019094
2020-04-03 20:53:32 +00:00
Tin Lam
12bee1bb97 Migrate default release to Stein
This patch set updates the default job to use OpenStack Stein release.
The previously default Ocata release will be place in separate job.

Change-Id: I489324f762a179a2cab5499a6d8e57e97c81297f
Signed-off-by: Tin Lam <tin@irrational.io>
2020-01-09 10:00:31 -06:00
Prateek Dodda
c2bd947787 Adding missing readOnlyRootFilesystem flag for container security context
Change-Id: Id11292ec0a76dbf659e918833859b9109c07cc18
2019-11-26 20:33:02 +00:00
Tin Lam
a25eccb7cb Implements egress network policy
This patch set adds in the egress policy for core OpenStack Services.

Depends-On: https://review.opendev.org/#/c/679853/

Change-Id: I585ddabcbd640db784520c913af8eddecaee3843
Signed-off-by: Tin Lam <tlam@omegaprime.dev>
2019-11-22 01:16:49 +00:00
Steven Fitzpatrick
5c6811503f Update Horizon Helm test to use python3
This change updates the tests container image
to one which installs python3.

The selenium-test.py template file has been refactored
to match the structure of the selenium tests in
openstack-helm-infra/tools/gate/selenium

Change-Id: I568bea8d715ea28b8e750215d166ba1b04e4172d
2019-10-21 12:53:09 -05:00
Steve Wilkerson
9736f5f544 Update kubernetes-entrypoint image reference
This updates the kubernetes-entrypoint image reference to consume
the publicly available kubernetes-entrypoint image that is built
and maintained under the airshipit namespace, as the stackanetes
image is no longer actively maintainedy

Depends-On: https://review.opendev.org/688435

Change-Id: I8e76cdcc9d4db8975b330e97169754a2a407341f
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-10-21 13:58:22 +00:00
NarlaSandeepNarlaSaibaba
243f74f10d Horizon – API Handling – HTTP Security Headers Not Present
Added new X-Content-Type-Options: nosniff header to make sure the browser
does not try to detect a different Content-Type than what is actually
sent (can lead to XSS)

Added new Header and set X-Permitted-Cross-Domain-Policies: "none"

Change-Id: I6f89ffb44ad805039c4074889a7c15fbef6fc95e
2019-10-18 15:31:14 +00:00
Chris Wedgwood
be3a4f65de [horizon] enable the Apache "Header" module by default
Some configuration when enable will explicitly set headers, for this
to work the header module should be enabled.

Change-Id: If549d4c6924c990d1a48bca193935ed9a2ed6864
2019-10-16 21:45:35 +00:00
Gage Hugo
c3e085b800 Add network policy nonvoting checks
This change adds two network policy zuul checks, one for the compute-kit,
and one for cinder/ceph, to test network policy for each OpenStack
service. These checks will be non-voting initially.

The network policy rules for each service will initially allow all
traffic. These ingress/egress rules will be defined in future changes
to only explicitly allow traffic between services that are explicitly
allowed to communicate, other traffic will be denied.

Depends-On: https://review.opendev.org/#/c/685130/

Change-Id: Ide2998ebb2af2832f24ca7abc398a82e4a6d70e3
2019-09-26 11:57:15 -05:00
zhouyao
058769c49c Add 'PATCH' to request method in order to enable 'PATCH' method in Horizon
Change-Id: I2e5f08cdde91c842c574d5318b8ae3113dd6fa80
Closes-Bug: #1821213
2019-07-30 16:25:22 +08:00
Gupta, Sangeet (sg774j)
4f5a78351d Horizon: Expose additional security config params
Expose additional Horizon security params in accordance with the
OpenStack Security Guide [0]

- ALLOWED_HOSTS
- HORIZON_IMAGES_UPLOAD_MODE

[0] https://docs.openstack.org/security-guide/dashboard/domains-dashboard-upgrades-basic-web-server-configuration.html

Depends-On: https://review.opendev.org/#/c/635545

Change-Id: I071c8fbfc5ea9b41d3c35840e342d83349ae1613
2019-07-18 10:15:56 -05:00
Zuul
fb49cd9903 Merge "Horizon: Set SECURE_PROXY_ADDR_HEADER" 2019-06-26 13:40:51 +00:00
Steve Wilkerson
0e1c296101 Horizon helm tests
This adds a helm test for Horizon, the helm test
runs a selenium webdriver check to verify the dashboard
is up

Change-Id: I3616c05596b2bd94931c39fb774333bf65453d52
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-06-05 12:41:21 -05:00
sg774j
0d1e01ee3d Horizon: Set SECURE_PROXY_ADDR_HEADER
Setting this to HTTP_X_FORWARDED_FOR will display the IP in
X-Forwarded-For header instead of REMOTE_ADDR. This is to display
client's IP.

Change-Id: Ifab508f2c3e39de69e3b1423b6aab57e333fc37e
2019-05-20 14:20:53 -05:00
Zuul
f8adab245b Merge "Point to OSH-images images" 2019-05-18 19:12:58 +00:00
Jean-Philippe Evrard
1d335146fa Point to OSH-images images
We now have a process for OSH-images image building,
using Zuul, so we should point the images by default to those
images, instead of pointing to stale images.

Without this, the osh-images build process is completely not
in use, and updating the osh-images process or patching its
code has no impact on OSH.

This should fix it.

Change-Id: I672b8755bf9e182b15eff067479b662529a13477
2019-05-13 10:58:02 +02:00
Roy Tang (rt7380)
5df6fa3789 Expose Anti-Affinity Weight Setting.
Add weight default setting to anti-affinity.

Depends-on: Id8eb303674764ef8b0664f62040723aaf77e0a54
Change-Id: I09f96522cddf3a77dae73daca4557877eda5df50
2019-05-10 22:05:24 -05:00
sg774j
8b8e568d21 Horizon: Corrected mounted file name.
Horizon dashboard was not being displayed correctly due to incorrect
config file names.

Change-Id: I43b34cd7d7711e01b8a95d0b45e10d7ee57051e9
2019-04-26 14:34:07 +00:00
Itxaka
55f70be381 Add heat dashboard if available to horizon
Currently there is no enabling of the heat dashboard if its
installed on the horizon image.

This patch add an extra conf var that allows several dashboards
to be added and will try to find and enable them on start

If the panel dirs dont exists, it will do nothing

This patch add the extra heat_dashboard and includes the existing
neutron_taas_dashboard into the new config

Change-Id: Ibcc4da166d907f3cb842bfc45d842a650361a2d8
2019-04-15 07:13:18 +00:00
Huang,Sophie
f92bfd7f6a Add log level variable to Horizon log configuration
log_level variable is added to Horizon configuration. This
will enable the overwriting of the log levels in a
customized manifest.

Change-Id: I15381add9ee1e880e73004131b329ac02972755b
Signed-off-by: Huang,Sophie <sh879n@att.com>
2019-04-11 10:56:32 -05:00
Zuul
5c9dd146b8 Merge "Remove overlapping Listen directives on apache >= 2.4" 2019-04-06 04:37:01 +00:00
Itxaka
38fb90d528
Allow more generic overrides for horizon
With this patch we allow for a more easy way of overriding some
of the values that may be used in other distros while maintainting
the default values if those values are not overriden.

The following values are introduced to be overriden:
conf:
  software:
    apache2:
      conf_dir:
      site_dir:
      mods_dir:
      binary:
      start_flags:
      a2enmod:
      a2dismod:

On which:
 * conf_dir: directory where to drop the config files
 * site_dir: directory where to drop the enabled virtualhosts
 * mods_dir: directory where to drop any mod configuration
 * binary: the binary to use for launching apache
 * start_flags: any flags that will be passed to the apache binary call
 * a2enmod: mods to enable
 * a2dismod: mods to disable

Notice that if there is no overrides given, it should not affect anything
and the templates will not be changed as the default values are set to what
they used to be as to not disrupt existing deployments.

Change-Id: If0fb9ab03aacfcd7087e753698880505571d0233
2019-04-02 12:29:35 +02:00
pd2839
b5063695b0 Implement Security Context for Horizon
Implement container security context for the following Horizon resources:
 - Horizon server deployment

Change-Id: I8202cd011f4c4f73d778c5f0ad2648440e259e5d
2019-03-22 21:33:08 +00:00
Itxaka
2ec91c4c3f
Remove overlapping Listen directives on apache >= 2.4
As mentioned on the apache docs[0] having 2 overlapping
listen directories will cause the apache server to fail
with a fatal error. The seems like it was ignored on
earlier versions so we can use the version module to
change it based on the current apache version as to
not affect existing deployments

[0] https://httpd.apache.org/docs/2.4/es/bind.html

Change-Id: I8ce260e020375e93befa5e2e6df22eca0eaf9d07
2019-03-21 15:11:02 +01:00
Jiří Suchomel
a2a5dda47c Added volume related keys to pod mounts to ease the overriding
If user wants to add an extra volumeMounts/volume to a pod,
amd uses override values e.g. like this

pod:
  mounts:
    nova_placement:
      init_container: null
      nova_placement:
        volumeMounts:
          - name: nova-etc
          ...

helm template parser complains with

Warning: The destination item 'nova_placement' is a table and ignoring the source 'nova_placement' as it has a non-table value of: <nil>

So when we create empty values for such keys in values.yaml, the source
will be present and warning does not need to be shown.

Change-Id: Ib8dc53c3a54e12014025de8fafe16fbe9721c0da
2019-03-15 16:29:19 +00:00
Rick Bartra
e60c91e99d Horizon: Expose additional security config params
Expose additional Horizon security params in accordance with the
OpenStack Security Guide [0]

- Check-Dashboard-03: Is DISALLOW_IFRAME_EMBED parameter set to True
- Check-Dashboard-07: Is PASSWORD_AUTOCOMPLETE set to False

[0] https://docs.openstack.org/security-guide/dashboard/checklist.html

Change-Id: I355ddbc9fb1dcd0a6100ee650afd54680ef9ffbd
2019-02-07 09:13:35 -05:00
Pete Birley
b02ec05d76 Horizon: Expose security config params
This PS exposes security related config params

Change-Id: Ia6d2e089301cfc8fd809380ad3f31c6e37dc5607
Signed-off-by: Pete Birley <pete@port.direct>
2019-02-01 22:30:14 +00:00
Dmitrii Kabanov
1173ef79a1 [Horizon] Hide OS and Apache version in error messages
This PS allows to customize (and disable) information about OS and
Apache version displayed on pages with error messages.

Change-Id: Ic4d19bcc90dadf5cf26faa5c8fb39de00a6f3212
2019-01-21 00:41:49 +00:00
dt241s@att.com
f1d3bf7a1c Disable Critical Information Exposure through Directory Listing
This disables static page on Apache which would disable Directory
 Listings. This is done as a part of Security defect.

Change-Id: Ia1aa07c83c0db9dc33be6d1dfa7e2e60b3a33de9
2019-01-15 12:44:34 -06:00
Zuul
326981fe28 Merge "fix the url in doc" 2018-12-28 08:33:43 +00:00
Zuul
9643d059f0 Merge "Enable runAsUser in pod level" 2018-12-27 16:29:02 +00:00
Hyunkook Cho
642d26cf4d Horizon: add tcp port to network policy for nodeport
This patch fixes the network policy issue when use nodeport mode.
If you enable node port witout this patch, it will block by network policy.
so should be allowed tcp port of horizon when use nodeport.

Change-Id: I5e2622c29c6a32ab6d1c5d99d84d4f13382dab65
Signed-off-by: Hyunkook Cho <hk0713.cho@samsung.com>
2018-12-26 18:09:14 +09:00
melissaml
35d94c4efe fix the url in doc
Change-Id: I7b2fe30bb3fdf129e57216ff1c1b61f0ff52b9fc
2018-12-25 17:39:11 +08:00
Tin Lam
a60cdbf310 Enable runAsUser in pod level
This patchset enables and moves the securityContext: runAsUser to the pod
level, and uses a non-root user (UID != 0) wherever applicable.

Depends-On: I95264c933b51e2a8e38f63faa1e239bb3c1ebfda
Change-Id: I81f6e11fe31ab7333a3805399b2e5326ec1e06a7
Signed-off-by: Tin Lam <tin@irrational.io>
2018-12-25 05:33:54 +00:00
Mike Pham
95a6a2e875 Enable Egress policy enforcement
This PS is enable the Egress policies
and enforces them in Openstack-helm.

Depends-On: Icbe2a18c98dba795d15398dcdcac64228f6a7b4c
Change-Id: I6ef3cd157749fd562acb2f89ad44e63be4f7e975
2018-12-17 14:38:29 +00:00
Tin Lam
29f32a07ac Enable network policy enforcement
This patch set updates the gate to by default uses network policy
for all components and enforces them in Openstack-helm.

Change-Id: I70c90b5808075797f02670f21481a4f968205325
Depends-On: I78e87ef3276e948ae4dd2eb462b4b8012251c8c8
Co-Authored-By: Mike Pham <tp6510@att.com>
Signed-off-by: Tin Lam <tin@irrational.io>
2018-10-23 14:58:13 +00:00
Tin Lam
3cd4d0898a Upgrade default from newton to ocata
This patch set moves the default deployment to ocata from newton.
Newton zuul job is now moved into its separate job.

Change-Id: Ic534c8ee02179f23c7855d93a4707e5a2fd77354
Signed-off-by: Tin Lam <tin@irrational.io>
2018-10-13 04:18:46 +00:00
Zuul
653ee1330b Merge "Horizon: HTTP Verb Tampering vulnerability fix" 2018-10-01 07:34:14 +00:00
Dmitrii Kabanov
b8eb8b3581 Horizon: HTTP Verb Tampering vulnerability fix
The patch fixes the HTTP verb tampering issue. The idea is to disable
unnecessary HTTP methods for the Horizon. You can find a link to
the description [0] and a link to the White Paper [1] below:

CAPEC-274: HTTP Verb Tampering
[0] https://capec.mitre.org/data/definitions/274.html

Bypassing Web Authentication and Authorization with HTTP Verb Tampering
(Bypassing_VBAAC_with_HTTP_Verb_Tampering.pdf)
[1] https://dl.packetstormsecurity.net/papers/web/Bypassing_VBAAC_with_HTTP_Verb_Tampering.pdf

Change-Id: I98169973410bc1dce779ac1e870256b9a45d2cc8
2018-09-28 12:12:41 -07:00
Roman Gorshunov
1e8488d253 Minor: memory allocation mistypes fix
Memory allocation mistypes fix:
"1204Mi" -> "1024Mi"
"124Mi" -> "128Mi"

Change-Id: Ic1abc86f3e9b3ba478645ee2b4e46a8310948540
2018-09-27 12:29:08 +02:00