Skip to content

Commit 4bf161c

Browse files
jcchrjpggvilaca
andauthored
ITEP 70558 hide reset password (#558)
Co-authored-by: Joao Vilaca <joao.vilaca@intel.com>
1 parent d51fed3 commit 4bf161c

4 files changed

Lines changed: 34 additions & 29 deletions

File tree

platform/services/user_directory/chart/templates/virtual_service.yaml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,31 @@ spec:
1010
gateways:
1111
- {{ .Values.global.istio_ingress_namespace }}/{{ .Values.global.istio_gateway_name }}
1212
http:
13-
- match:
14-
- uri:
15-
regex: "/api/v[^/]*/users/request_password_reset/?"
16-
{{- if $.Values.global.cors_policy.enabled }}
17-
corsPolicy:
18-
allowHeaders: {{- include "user-directory.appendToArray" (dict "sourceArray" $.Values.global.cors_policy.allowed_headers) | indent 6 }}
19-
allowOrigins: {{- include "user-directory.formatKeyValuePair" (dict "sourceDict" $.Values.global.cors_policy.allowed_origins) | indent 6 }}
20-
allowMethods: {{- include "user-directory.appendToArray" (dict "sourceArray" $.Values.global.cors_policy.allowed_methods) | indent 6 }}
21-
maxAge: {{ .Values.global.cors_policy.max_age | quote }}
22-
allowCredentials: {{ .Values.global.cors_policy.allow_credentials }}
23-
{{- end }}
24-
headers:
25-
response:
26-
set:
27-
Cache-Control: "no-cache, no-store, max-age=0, must-revalidate"
28-
{{ .Values.global.security_headers | indent 10 }}
29-
remove:
30-
{{ .Values.global.stripped_headers | indent 8 }}
31-
timeout: 360s
32-
route:
33-
- destination:
34-
host: {{ include "user-directory.name" . }}.{{ .Release.Namespace }}.svc.cluster.local
35-
port:
36-
number: {{ .Values.port }}
13+
{{/* endpoint disabled due to a possibility of using it to takeover of Geti account via password request poisoning - see ITEP-70558*/}}
14+
{{/* - match: */}}
15+
{{/* - uri: */}}
16+
{{/* regex: "/api/v1/users/request_password_reset/?" */}}
17+
{{/* {{- if $.Values.global.cors_policy.enabled }} */}}
18+
{{/* corsPolicy: */}}
19+
{{/* allowHeaders: {{- include "user-directory.appendToArray" (dict "sourceArray" $.Values.global.cors_policy.allowed_headers) | indent 6 }} */}}
20+
{{/* allowOrigins: {{- include "user-directory.formatKeyValuePair" (dict "sourceDict" $.Values.global.cors_policy.allowed_origins) | indent 6 }} */}}
21+
{{/* allowMethods: {{- include "user-directory.appendToArray" (dict "sourceArray" $.Values.global.cors_policy.allowed_methods) | indent 6 }} */}}
22+
{{/* maxAge: {{ .Values.global.cors_policy.max_age | quote }} */}}
23+
{{/* allowCredentials: {{ .Values.global.cors_policy.allow_credentials }} */}}
24+
{{/* {{- end }} */}}
25+
{{/* headers: */}}
26+
{{/* response: */}}
27+
{{/* set: */}}
28+
{{/* Cache-Control: "no-cache, no-store, max-age=0, must-revalidate" */}}
29+
{{/*{{ .Values.global.security_headers | indent 10 }} */}}
30+
{{/* remove: */}}
31+
{{/*{{ .Values.global.stripped_headers | indent 8 }} */}}
32+
{{/* timeout: 360s */}}
33+
{{/* route: */}}
34+
{{/* - destination: */}}
35+
{{/* host: {{ include "user-directory.name" . }}.{{ .Release.Namespace }}.svc.cluster.local */}}
36+
{{/* port: */}}
37+
{{/* number: {{ .Values.port }} */}}
3738
- match:
3839
- uri:
3940
regex: "/api/v[^/]*/users/reset_password/?"

web_ui/dex_templates/templates/password.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ <h1 class="loginBox__signIn" id="login-sign-in">Sign in</h1>
5454
</div>
5555
</div>
5656
</div>
57-
{{ if eq ("isSMTPDefined" | extra) "true" }}
57+
<!-- {/* Disabled temporarily: https://jira.devtools.intel.com/browse/ITEP-70558 */} -->
58+
<!-- {{ if eq ("isSMTPDefined" | extra) "true" }}
5859
<div class="loginBox__forgotPassword">
5960
<a href="/registration/forgot-password" id="forgot-password-id" class="loginBox__link">Forgot password?</a>
6061
</div>
61-
{{ end }}
62+
{{ end }} -->
6263
<button tabindex="3" id="submit-login" class="spectrum-Button spectrum-Button--cta spectrum-Button--sizeL loginBox__btn" type="submit">
6364
<span class="spectrum-Button-label" id="login-sign-in-btn">Sign In</span>
6465
</button>

web_ui/src/routes/app-routes.component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import { SignUp } from '../pages/sign-up/sign-up.component';
2222
import { InstallationModeProvider } from '../providers/installation-mode-provider.component';
2323
import { TusUploadProvider } from '../providers/tus-upload-provider/tus-upload-provider.component';
2424
import { LicenseModal } from '../shared/components/license-modal/license-modal.component';
25-
import { ForgotPassword } from '../sign-up/pages/forgot-password/forgot-password.component';
2625
import { InvalidLink } from '../sign-up/pages/invalid-link/invalid-link.component';
2726
import { Registration } from '../sign-up/pages/registration/registration.component';
2827
import { ResetPassword } from '../sign-up/pages/reset-password/reset-password.component';
@@ -146,7 +145,8 @@ export const appRoutes = () => {
146145
}
147146
>
148147
<Route path={paths.register.signUp.pattern} element={<Registration />} />
149-
<Route path={paths.register.forgotPassword.pattern} element={<ForgotPassword />} />
148+
{/* Disabled temporarily: https://jira.devtools.intel.com/browse/ITEP-70558 */}
149+
{/* <Route path={paths.register.forgotPassword.pattern} element={<ForgotPassword />} /> */}
150150
<Route path={paths.register.resetPassword.pattern} element={<ResetPassword />} />
151151
<Route path={paths.register.invalidLink.pattern} element={<InvalidLink />} />
152152
<Route path={paths.register.userNotFound.pattern} element={<UserNotFound />} />

web_ui/tests/features/auth/registration/registration.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ test.describe('Registration', () => {
1515
await page.addInitScript(() => localStorage.clear());
1616
});
1717

18-
test('it will let the user request to reset their password', async ({ page, openApi, baseURL }) => {
18+
{
19+
/* Disabled temporarily: https://jira.devtools.intel.com/browse/ITEP-70558 */
20+
}
21+
test.skip('it will let the user request to reset their password', async ({ page, openApi, baseURL }) => {
1922
openApi.registerHandler('notFound', (c, res, ctx) => {
2023
if (c.request.path === '/users/request_password_reset') {
2124
return res(ctx.status(200), ctx.json({ moi: 'houi' }));

0 commit comments

Comments
 (0)