Skip to content

Added azuthnone changes#59

Open
pragyagandhi wants to merge 3 commits intomainfrom
personal/pragyagandhi/AddAuthNodeAzAuthRPC
Open

Added azuthnone changes#59
pragyagandhi wants to merge 3 commits intomainfrom
personal/pragyagandhi/AddAuthNodeAzAuthRPC

Conversation

@pragyagandhi
Copy link
Collaborator

No description provided.

client_id.c_str());
goto destroy_context;
}
mo.authtype = "AzAuthAAD";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets set this value in constructor.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this from PR


failed_get_clientip:
// Build and cache the client ID only once
static std::string client_id = std::to_string(get_current_usecs()) + "-" + std::string(ip);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Random number from /opt/microsoft/aznfs/data/client -- file and concatenate with macaddress.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets create 16bytes random number which is same for all connection and valid till this process is up.


return client_id;

failed_get_clientip:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed case return empty client_id which means error and mount should fail without client-id.

}

cb_res->azauth_data = strdup("None");
cb_res->expiry_time = static_cast<uint64_t>(time(NULL))+300;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 300 ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you handle in AzAuthNone in rpc_auth_needs_refresh() then you don't need this .


failed_get_clientip:
// Build and cache the client ID only once
static std::string client_id = std::to_string(get_current_usecs()) + "-" + std::string(ip);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets create 16bytes random number which is same for all connection and valid till this process is up.

}

cb_res->azauth_data = strdup("None");
cb_res->expiry_time = static_cast<uint64_t>(time(NULL))+300;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you handle in AzAuthNone in rpc_auth_needs_refresh() then you don't need this .

return cb_res;
}

uint64_t set_azauth_res_sc_cb(uint64_t server_cap_map)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this capability code.

} else {
set_auth_token_callback(get_auth_token_and_setargs_cb_none);
}
set_azauth_res_callback(set_azauth_res_sc_cb);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this one also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants