File tree Expand file tree Collapse file tree 5 files changed +54
-1
lines changed
Expand file tree Collapse file tree 5 files changed +54
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,15 @@ Thanks for upgrading to the latest version of the ALKS CLI!
77 - Type to filter accounts by alias or account ID instead of scrolling
88 - Uses case-insensitive substring matching
99
10+ ★ Release Notes: 2026-02-24 ★
11+ ≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
12+
13+ Thanks for upgrading to the latest version of the ALKS CLI!
14+
15+ * Added deprecation warning for Basic Authentication (US1879500).
16+ - A warning banner now appears whenever a command runs using basic auth (network password)
17+ - Basic Authentication will be retired on May 3rd; please migrate to OAuth2 via `alks developer configure`
18+
1019Have feedback? https://github.com/Cox-Automotive/ALKS-CLI/issues
1120
1221☁☁☁☁☁☁ Happy Clouding! ☁☁☁☁☁☁
Original file line number Diff line number Diff line change 11import ALKS , { AlksProps , create } from 'alks.js' ;
2+ import { yellow } from 'cli-color' ;
23import { getUserAgentString } from './getUserAgentString' ;
4+ import { defaultServer } from './promptForServer' ;
35import { getServer } from './state/server' ;
46
57interface TokenProps {
@@ -30,6 +32,20 @@ export async function getAlks(props: Props): Promise<ALKS.Alks> {
3032 ) ;
3133 }
3234
35+ const normalizedServer = server . replace ( / \/ + $ / , '' ) ;
36+ const normalizedDefault = defaultServer . replace ( / \/ + $ / , '' ) ;
37+ const defaultOrigin = defaultServer . replace ( / \/ r e s t \/ ? $ / , '' ) ;
38+ if (
39+ normalizedServer !== normalizedDefault &&
40+ normalizedServer . startsWith ( defaultOrigin )
41+ ) {
42+ console . error (
43+ yellow (
44+ `Tip: Did you mean ${ defaultServer } ? Run \`alks developer configure\` to update your server URL.`
45+ )
46+ ) ;
47+ }
48+
3349 // FYI: for enabled but not enforced we should not send the Test header.
3450 const mergedHeaders = {
3551 ...( props . headers || { } ) ,
Original file line number Diff line number Diff line change 1+ import { yellow } from 'cli-color' ;
12import { log } from '../lib/log' ;
23import { Auth } from '../model/auth' ;
34import { promptForPassword } from './promptForPassword' ;
5+ import { showBorderedMessage } from './showBorderedMessage' ;
46import { getPassword } from './state/password' ;
57import { getToken } from './state/token' ;
68import { getUserId } from './state/userId' ;
79
10+ let deprecationWarningShown = false ;
11+
812// TODO: refactor all calls to this function to do their own error handling so that we can just return Auth or undefined
913export async function getAuth ( ) : Promise < Auth > {
1014 log ( 'checking for refresh token' ) ;
@@ -23,6 +27,19 @@ export async function getAuth(): Promise<Auth> {
2327 }
2428 // If password is not set, ask for a password
2529 const password = ( await getPassword ( ) ) || ( await promptForPassword ( ) ) ;
30+
31+ if ( ! deprecationWarningShown ) {
32+ deprecationWarningShown = true ;
33+ showBorderedMessage (
34+ 80 ,
35+ yellow (
36+ '⚠ DEPRECATION WARNING: Basic Authentication (network password) will be\n' +
37+ ' retired on May 3rd. Please run `alks developer configure` to migrate\n' +
38+ ' to OAuth2 (refresh token) authentication.'
39+ )
40+ ) ;
41+ }
42+
2643 const auth = { userid, password } ;
2744 return auth ;
2845 }
Original file line number Diff line number Diff line change 11import commander from 'commander' ;
2+ import { yellow } from 'cli-color' ;
23import { checkForUpdate } from '../checkForUpdate' ;
34import { errorAndExit } from '../errorAndExit' ;
45import { log } from '../log' ;
56import { promptForPassword } from '../promptForPassword' ;
67import { promptForUserId } from '../promptForUserId' ;
8+ import { showBorderedMessage } from '../showBorderedMessage' ;
79import { setPassword } from '../state/password' ;
810import { setUserId } from '../state/userId' ;
911
1012export async function handleAlksDeveloperLogin (
1113 options : commander . OptionValues
1214) {
1315 try {
16+ showBorderedMessage (
17+ 80 ,
18+ yellow (
19+ '⚠ DEPRECATION WARNING: Basic Authentication (network password) will be\n' +
20+ ' retired on May 3rd. Please use `alks developer configure` to set up\n' +
21+ ' OAuth2 (refresh token) authentication instead.'
22+ )
23+ ) ;
24+
1425 const userId = options . username ?? ( await promptForUserId ( ) ) ;
1526 log ( 'saving user ID' ) ;
1627 await setUserId ( userId ) ;
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export async function promptForAuthType(): Promise<string> {
1818 short : REFRESH_TOKEN_AUTH_CHOICE ,
1919 } ,
2020 {
21- name : `[${ PASSWORD_AUTH_CHOICE } ] Store your network password (not recommended)` ,
21+ name : `[${ PASSWORD_AUTH_CHOICE } ] Store your network password (DEPRECATED - retiring May 3rd, not recommended)` ,
2222 value : PASSWORD_AUTH_CHOICE ,
2323 short : PASSWORD_AUTH_CHOICE ,
2424 } ,
You can’t perform that action at this time.
0 commit comments