@@ -272,7 +272,7 @@ func (a *Ignition) Generate(_ context.Context, dependencies asset.Parents) error
272272
273273 rendezvousHostFile := ignition .FileFromString (rendezvousHostEnvPath ,
274274 "root" , 0644 ,
275- getRendezvousHostEnv (agentTemplateData .ServiceProtocol , a .RendezvousIP , agentWorkflow .Workflow ))
275+ getRendezvousHostEnv (agentTemplateData .ServiceProtocol , a .RendezvousIP , keyPairAsset . Token , agentWorkflow .Workflow ))
276276 config .Storage .Files = append (config .Storage .Files , rendezvousHostFile )
277277
278278 err = addBootstrapScripts (& config , agentManifests .ClusterImageSet .Spec .ReleaseImage )
@@ -378,8 +378,7 @@ func getTemplateData(name, pullSecret, releaseImageList, releaseImage,
378378 infraEnvID string ,
379379 osImage * models.OsImage ,
380380 proxy * v1beta1.Proxy ,
381- imageTypeISO ,
382- publicKey , token , caBundleMount string ) * agentTemplateData {
381+ imageTypeISO , publicKey , token , caBundleMount string ) * agentTemplateData {
383382 return & agentTemplateData {
384383 ServiceProtocol : "http" ,
385384 PullSecret : pullSecret ,
@@ -401,7 +400,7 @@ func getTemplateData(name, pullSecret, releaseImageList, releaseImage,
401400 }
402401}
403402
404- func getRendezvousHostEnv (serviceProtocol , nodeZeroIP string , workflowType workflow.AgentWorkflowType ) string {
403+ func getRendezvousHostEnv (serviceProtocol , nodeZeroIP , token string , workflowType workflow.AgentWorkflowType ) string {
405404 serviceBaseURL := url.URL {
406405 Scheme : serviceProtocol ,
407406 Host : net .JoinHostPort (nodeZeroIP , "8090" ),
@@ -412,12 +411,23 @@ func getRendezvousHostEnv(serviceProtocol, nodeZeroIP string, workflowType workf
412411 Host : net .JoinHostPort (nodeZeroIP , "8888" ),
413412 Path : "/" ,
414413 }
414+ // AGENT_AUTH_TOKEN is required to authenticate API requests against agent-installer-local auth type.
415+ // PULL_SECRET_TOKEN contains the same value as AGENT_AUTH_TOKEN. The name PULL_SECRET_TOKEN is used in
416+ // assisted-installer-agent, which is responsible for authenticating API requests related to agents.
417+ // Historically, PULL_SECRET_TOKEN was used solely to store the pull secrets.
418+ // However, as the authentication mechanisms have evolved, PULL_SECRET_TOKEN now
419+ // stores a JWT (JSON Web Token) in the context of local authentication.
420+ // Consequently, PULL_SECRET_TOKEN must be set with the value of AGENT_AUTH_TOKEN to maintain compatibility
421+ // and ensure successful authentication.
422+ // In the absence of PULL_SECRET_TOKEN, the cluster installation will wait forever.
415423
416424 return fmt .Sprintf (`NODE_ZERO_IP=%s
417425SERVICE_BASE_URL=%s
418426IMAGE_SERVICE_BASE_URL=%s
427+ AGENT_AUTH_TOKEN=%s
428+ PULL_SECRET_TOKEN=%s
419429WORKFLOW_TYPE=%s
420- ` , nodeZeroIP , serviceBaseURL .String (), imageServiceBaseURL .String (), workflowType )
430+ ` , nodeZeroIP , serviceBaseURL .String (), imageServiceBaseURL .String (), token , token , workflowType )
421431}
422432
423433func getAddNodesEnv (clusterInfo joiner.ClusterInfo ) string {
0 commit comments