Skip to content

Commit c0a0e4e

Browse files
committed
Remove defunct custos auth provider
1 parent f77f6e2 commit c0a0e4e

File tree

19 files changed

+55
-133
lines changed

19 files changed

+55
-133
lines changed

client/src/components/Login/LoginForm.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe("LoginForm", () => {
4242
axiosMock = new MockAdapter(axios);
4343
server.use(
4444
http.get("/api/configuration", ({ response }) => {
45-
return response.untyped(HttpResponse.json({ oidc: { cilogon: false, custos: false } }));
45+
return response.untyped(HttpResponse.json({ oidc: { cilogon: false } }));
4646
}),
4747
);
4848
});

client/src/components/Register/RegisterForm.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ interface Props {
3232
enableOidc?: boolean;
3333
mailingJoinAddr?: string;
3434
oidcIdps?: OIDCConfig;
35-
preferCustosLogin?: boolean;
35+
preferOIDCLogin?: boolean;
3636
redirect?: string;
3737
registrationWarningMessage?: string;
3838
serverMailConfigured?: boolean;
@@ -58,8 +58,8 @@ const labelSubscribe = ref(localize("Stay in the loop and join the galaxy-announ
5858
5959
const idpsWithRegistration = computed(() => (props.oidcIdps ? getOIDCIdpsWithRegistration(props.oidcIdps) : {}));
6060
61-
const custosPreferred = computed(() => {
62-
return props.enableOidc && props.preferCustosLogin;
61+
const oidcPreferred = computed(() => {
62+
return props.enableOidc && props.preferOIDCLogin;
6363
});
6464
6565
/** This decides if all register options should be displayed in column style
@@ -107,30 +107,30 @@ async function submit() {
107107

108108
<BForm id="registration" @submit.prevent="submit()">
109109
<BCard no-body>
110-
<!-- OIDC and Custos enabled and prioritized: encourage users to use it instead of local registration -->
111-
<span v-if="custosPreferred">
110+
<!-- OIDC enabled and prioritized: encourage users to use it instead of local registration -->
111+
<span v-if="oidcPreferred">
112112
<BCardHeader v-b-toggle.accordion-oidc role="button">
113113
Register using institutional account
114114
</BCardHeader>
115115

116116
<BCollapse id="accordion-oidc" visible role="tabpanel" accordion="registration_acc">
117117
<BCardBody>
118118
Create a Galaxy account using an institutional account (e.g.:Google/JHU). This will
119-
redirect you to your institutional login through Custos.
119+
redirect you to your institutional login through OIDC.
120120
<ExternalLogin class="mt-2" />
121121
</BCardBody>
122122
</BCollapse>
123123
</span>
124124

125125
<!-- Local Galaxy Registration -->
126-
<BCardHeader v-if="!custosPreferred" v-localize>Create a Galaxy account</BCardHeader>
126+
<BCardHeader v-if="!oidcPreferred" v-localize>Create a Galaxy account</BCardHeader>
127127
<BCardHeader v-else v-localize v-b-toggle.accordion-register role="button">
128128
Or, register with email
129129
</BCardHeader>
130130

131131
<BCollapse
132132
id="accordion-register"
133-
:visible="!custosPreferred"
133+
:visible="!oidcPreferred"
134134
role="tabpanel"
135135
accordion="registration_acc">
136136
<BCardBody :class="{ 'd-flex w-100': !registerColumnDisplay }">

client/src/components/User/ExternalIdentities/ExternalIDHelper.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export type OIDCConfigWithRegistration = Record<
2626

2727
/** Return the per-IDP config, minus anything the caller wants to hide. */
2828
export function getFilteredOIDCIdps(oidcConfig: OIDCConfig, exclude: string[] = []): OIDCConfig {
29-
const blacklist = new Set(["cilogon", "custos", ...exclude]);
29+
const blacklist = new Set(["cilogon", ...exclude]);
3030
const filtered: OIDCConfig = {};
3131
Object.entries(oidcConfig).forEach(([idp, cfg]) => {
3232
if (!blacklist.has(idp)) {
@@ -51,11 +51,11 @@ export function getOIDCIdpsWithRegistration(oidcConfig: OIDCConfig): OIDCConfigW
5151

5252
/** Do we need to show the institution picker at all? */
5353
export const getNeedShowCilogonInstitutionList = (cfg: OIDCConfig): boolean => {
54-
return Boolean(cfg.cilogon || cfg.custos);
54+
return Boolean(cfg.cilogon);
5555
};
5656

5757
/**
58-
* Generic OIDC login (all providers *except* CILogon/Custos).
58+
* Generic OIDC login (all providers *except* CILogon).
5959
* Returns the redirect URI Galaxy gives back, or throws.
6060
*/
6161
export async function submitOIDCLogon(idp: string, redirectParam: string | null = null): Promise<string | null> {
@@ -73,8 +73,8 @@ export async function submitOIDCLogon(idp: string, redirectParam: string | null
7373
}
7474

7575
/**
76-
* CILogon/Custos login.
77-
* @param idp "cilogon" | "custos"
76+
* CILogon login.
77+
* @param idp "cilogon"
7878
* @param useIDPHint If true, append ?idphint=
7979
* @param idpHint The entityID to hint with (ignored when useIDPHint = false)
8080
*/
@@ -108,7 +108,7 @@ export async function redirectToSingleProvider(config: OIDCConfig): Promise<stri
108108
throw new Error("OIDC provider key is undefined.");
109109
}
110110

111-
if (idp === "cilogon" || idp === "custos") {
111+
if (idp === "cilogon") {
112112
const redirectUri = await submitCILogon(idp, false);
113113
return redirectUri;
114114
} else {

client/src/components/User/ExternalIdentities/ExternalIdentities.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export default {
121121
doomedItem: null,
122122
errorMessage: null,
123123
enable_oidc: galaxy.config.enable_oidc,
124-
cilogonOrCustos: null,
124+
cilogonOrOIDC: null,
125125
userEmail: galaxy.user.get("email"),
126126
};
127127
},

client/src/components/User/ExternalIdentities/ExternalLogin.vue

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const messageVariant = ref<string | null>(null);
5050
const cILogonIdps = ref<Idp[]>([]);
5151
const selected = ref<Idp | null>(null);
5252
const rememberIdp = ref(false);
53-
const cilogonOrCustos = ref<"cilogon" | "custos" | null>(null);
53+
const cilogon = ref<"cilogon" | null>(null);
5454
const toggleCilogon = ref(false);
5555
5656
const oIDCIdps = computed<OIDCConfig>(() => (isConfigLoaded.value ? config.value.oidc : {}));
@@ -60,22 +60,21 @@ const filteredOIDCIdps = computed(() => getFilteredOIDCIdps(oIDCIdps.value, prop
6060
const cilogonListShow = computed(() => getNeedShowCilogonInstitutionList(oIDCIdps.value));
6161
6262
const cILogonEnabled = computed(() => oIDCIdps.value.cilogon);
63-
const custosEnabled = computed(() => oIDCIdps.value.custos);
6463
6564
onMounted(async () => {
6665
rememberIdp.value = getIdpPreference() !== null;
6766
68-
// Only fetch CILogonIDPs if custos/cilogon configured
67+
// Only fetch CILogonIDPs if cilogon configured
6968
if (cilogonListShow.value) {
7069
await getCILogonIdps();
7170
}
7271
});
7372
74-
function toggleCILogon(idp: "cilogon" | "custos") {
75-
if (cilogonOrCustos.value === idp || cilogonOrCustos.value === null) {
73+
function toggleCILogon(idp: "cilogon") {
74+
if (cilogon.value === idp || cilogon.value === null) {
7675
toggleCilogon.value = !toggleCilogon.value;
7776
}
78-
cilogonOrCustos.value = toggleCilogon.value ? idp : null;
77+
cilogon.value = toggleCilogon.value ? idp : null;
7978
}
8079
8180
async function clickOIDCLogin(idp: string) {
@@ -186,7 +185,7 @@ function getIdpPreference() {
186185
<!-- OIDC login-->
187186
<BForm v-if="cilogonListShow" id="externalLogin" class="cilogon">
188187
<div v-if="props.loginPage">
189-
<!--Only Display if CILogon/Custos is configured-->
188+
<!--Only Display if CILogon is configured-->
190189
<BFormGroup label="Use existing institutional login">
191190
<Multiselect
192191
v-model="selected"
@@ -212,31 +211,18 @@ function getIdpPreference() {
212211
<LoadingSpan v-if="loading" message="Signing In" />
213212
<span v-else>Sign in with Institutional Credentials*</span>
214213
</GButton>
215-
<!--convert to v-else-if to allow only one or the other. if both enabled, put the one that should be default first-->
216-
<GButton
217-
v-if="Object.prototype.hasOwnProperty.call(oIDCIdps, 'custos')"
218-
:disabled="loading || selected === null"
219-
@click="clickCILogin('custos')">
220-
<LoadingSpan v-if="loading" message="Signing In" />
221-
<span v-else>Sign in with Custos*</span>
222-
</GButton>
214+
223215
</div>
224216

225217
<div v-else>
226218
<GButtonGroup class="w-100">
227219
<GButton
228220
v-if="cILogonEnabled"
229-
:pressed="cilogonOrCustos === 'cilogon'"
221+
:pressed="cilogon === 'cilogon'"
230222
@click="toggleCILogon('cilogon')">
231223
Sign in with Institutional Credentials*
232224
</GButton>
233225

234-
<GButton
235-
v-if="custosEnabled"
236-
:pressed="cilogonOrCustos === 'custos'"
237-
@click="toggleCILogon('custos')">
238-
Sign in with Custos*
239-
</GButton>
240226
</GButtonGroup>
241227

242228
<BFormGroup v-if="toggleCilogon" class="mt-1">
@@ -254,18 +240,18 @@ function getIdpPreference() {
254240
v-if="toggleCilogon"
255241
class="mt-1"
256242
:disabled="loading || selected === null"
257-
@click="clickCILogin(cilogonOrCustos)">
258-
Login via {{ cilogonOrCustos === "cilogon" ? "CILogon" : "Custos" }} *
243+
@click="clickCILogin(cilogon)">
244+
Login via CILogon *
259245
</GButton>
260246
</BFormGroup>
261247
</div>
262248

263249
<p class="mt-3">
264250
<small class="text-muted">
265-
* Galaxy uses CILogon via Custos to enable you to log in from this organization. By clicking
251+
* Galaxy uses CILogon to enable you to log in from this organization. By clicking
266252
'Sign In', you agree to the
267253
<a href="https://ca.cilogon.org/policy/privacy">CILogon</a> privacy policy and you agree to
268-
share your username, email address, and affiliation with CILogon, Custos, and Galaxy.
254+
share your username, email address, and affiliation with CILogon and Galaxy.
269255
</small>
270256
</p>
271257
</BForm>

client/src/components/User/ExternalIdentities/service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const getUrl = (path) => getRootFromIndexLink() + path;
66
export async function disconnectIdentity(doomed) {
77
if (doomed) {
88
let url;
9-
if (doomed.provider === "custos" || doomed.provider === "cilogon") {
9+
if (doomed.provider === "cilogon") {
1010
url = getUrl(`authnz/${doomed.provider}/disconnect/${doomed.email}`);
1111
} else {
1212
url = getUrl(`authnz/${doomed.provider}/disconnect/`);

client/src/entry/analysis/modules/Login.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const configMock = {
1313
allow_local_account_creation: true,
1414
enable_oidc: true,
1515
mailing_join_addr: "mailing_join_addr",
16-
prefer_custos_login: true,
16+
prefer_oidc_login: true,
1717
registration_warning_message: "registration_warning_message",
1818
server_mail_configured: true,
1919
show_welcome_with_login: true,

client/src/entry/analysis/modules/Register.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const configMock = {
1313
allow_local_account_creation: true,
1414
enable_oidc: true,
1515
mailing_join_addr: "mailing_join_addr",
16-
prefer_custos_login: true,
16+
prefer_oidc_login: true,
1717
registration_warning_message: "registration_warning_message",
1818
server_mail_configured: true,
1919
show_welcome_with_login: true,
@@ -61,7 +61,7 @@ describe("Register", () => {
6161
expect(props.sessionCsrfToken).toBe("session_csrf_token");
6262
expect(props.enableOidc).toBe(true);
6363
expect(props.mailingJoinAddr).toBe("mailing_join_addr");
64-
expect(props.preferCustosLogin).toBe(true);
64+
expect(props.preferOIDCLogin).toBe(true);
6565
expect(props.serverMailConfigured).toBe(true);
6666
expect(props.registrationWarningMessage).toBe("registration_warning_message");
6767
expect(props.termsUrl).toBe("terms_url");

client/src/entry/analysis/modules/Register.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const sessionCsrfToken = computed(() => {
2121
:enable-oidc="config.enable_oidc"
2222
:mailing-join-addr="config.mailing_join_addr"
2323
:oidc-idps="config.oidc"
24-
:prefer-custos-login="config.prefer_custos_login"
24+
:prefer-oidc-login="config.prefer_oidc_login"
2525
:registration-warning-message="config.registration_warning_message"
2626
:server-mail-configured="config.server_mail_configured"
2727
:session-csrf-token="sessionCsrfToken"

doc/source/admin/galaxy_options.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3818,11 +3818,11 @@
38183818

38193819

38203820
~~~~~~~~~~~~~~~~~~~~~~~
3821-
``prefer_custos_login``
3821+
``prefer_oidc_login``
38223822
~~~~~~~~~~~~~~~~~~~~~~~
38233823

38243824
:Description:
3825-
Controls the order of the login page to prefer Custos-based login
3825+
Controls the order of the login page to prefer OIDC-based login
38263826
and registration.
38273827
:Default: ``false``
38283828
:Type: bool

0 commit comments

Comments
 (0)